Verify the following are installed/added in your system:
-
docker latest version (v20.x.x or higher) installed and should be running with non-root(arbitary) user
-
docker-compose latest version (1.29.2) installed and should be running with non-root(arbitary) user
-
GIT latest version (v2.33.x or higher)
-
Your ssh key is added to your gitlab account
-
docker extension (publisher:microsoft) installed in Visual Studio Code
-
GIT must be installed with Git Bash
-
WSL2 (Windows Subsystem for Linux) should be enabled in docker
-
Port 80 should be available (Check if IIS is running). If not, choose other port to run the webserver.
-
set Docker to be started automatically on system startup
For windows, always use "git bash" to run commands. If you face any issue while running commands then, need to run the bash command adding "winpty".
Follow the below given steps to setup Lamp:
-
Go to your favourite path where you want to setup Lamp (i.e /home/user/my_env/) and execute the following command:
git archive --format=tar [email protected]:rxprojects/opscore/php/misc.git master -- docker/lamp/* | tar xf -
-
Run the below command:
cd docker/lamp
-
Configure environment using the below command:
cp sample.env .env
After running the above command, you can have a look at .env configuration. We don't recommend any changes in this however, one can only change ports if other services are running on common used ports (i.e Port 80)
-
Run the final command to start up your services:
HOSTNAME=${HOSTNAME} docker-compose up -d
After the setup is successfully installed, you will have the following things up and running:
-
Webserver: accessible at http://localhost
-
PhpMyAdmin: accessible at http://localhost:8081
Provide the permissions to windows platform while setup:
winpty docker exec -it OPS-database sh -c 'chmod 644 /etc/mysql/conf.d/my.cnf'
Note: Need to run the bash command adding "winpty" if you face any issue while giving permissions.
By default, only one database will be created named 'ops' but, you can create as many databases as you need.
Login credentials for the database:
username: root / radixdev
password: deep70
password: radixdev
One should grant privilages for newly created database to arbitary user 'radixdev' by running below query
GRANT ALL PRIVILEGES ON `dbname` . * TO 'radixdev'@'%';
For further configurations, click here.