Alias | Service | Version | Port |
---|---|---|---|
nginx | Nginx | 1.16.0 | 80 |
subcode | PHP FPM | 7.4 | 8080 |
mastercode | PHP FPM | 7.4 | 8081 |
livecode | Node JS | 12.10.0 | 8082 |
docode | Node JS | 12.10.0 | 8083 |
minio | Minio | RELEASE.2020-12-29T23-29-29Z | 8084 |
db_mysql | MySQL | 5.7.22 | 3306 |
redis | Redis DB | 5.0.5 | 6379 |
rabbitmq | Rabbit MQ | 3.7.18 | 5672, 15672 |
phpmyadmin | PhpMyAdmin | latest | 50 |
judgeMod | judgeMod | - | - |
- If you have
nginx
running natively, you've to stop that first.- To check:
sudo service nginx status
- To stop:
sudo service nginx stop
- To stop starting in every boot up:
sudo systemctl disable nginx
- NB: Sometimes it is possible that
apache2
is running, stop it by applying the same process, replacenginx
byapache2
(Ubuntu) orhttpd
(CentOS)
- To check:
- Open your
/etc/hosts
and add the following entries:
127.0.0.1 code.local
127.0.0.1 judge.code.local
127.0.0.1 master.code.local
127.0.0.1 live.code.local
127.0.0.1 content.code.local
127.0.0.1 mysql.code.local
127.0.0.1 redis.code.local
127.0.0.1 rmq.code.local
-
Clone this repo by this command:
git clone --recursive git@github.com:RafikFarhad/sust-oj-compose.git
- Copy
.env.example
as.env
and fill up values with string containing at least 10 character and digit HOST_IP
should be the ip adsress of the host pc.
-
Run
./setup.sh
and choose1
for the first time. This command will pull/build docker images, run dependency installation and some housekeeping tasks. -
Run
docker-compose up
ordocker-compose up -d
to deploy the system.
If any of the submodule update on this system, you can fecth and deploy the updates by following steps:
-
git pull --recurse-submodules
&&git submodule update --recursive
-
If any of the submodule updates its dependency, then you have to run
bash setup.sh
to update, otherwise this step is optional.
-
docker-compose stop && docker-compose up -d
-
This environment by default assumes that your Linux system user id and group id is
1000:1000
. If it is not then you may face some file permission related issue on linux system. -
Though this docker environment is built to serve a specific project, this environment can be used to use as developemnt setup for any Laravel/VueJs/ReactJs/NodeJs project.
- submit issue
- drop request to add more environment
- tweaks suggestion