- Docker >= 1.9.0
- MySQL Database
-
Set up a mysql database, for example
$ create database dbname character set utf8; $ GRANT ALL ON *.* TO 'user'@'%' IDENTIFIED BY 'password'; $ FLUSH PRIVILEGES;
-
Edit
client
(database) andemail
section inoj_web_build/NTHUOJ_web/nthuoj/config/nthuoj.cfg
-
Generate certificates and keys for TLS connection to docker daemon
$ sudo ./docker_tls_setup.sh
-
Configure docker daemon with TLS support
-
If your system (Ex. Ubuntu 15.04 or higher) uses systemd as a process manager, please follow the steps below
-
Create a systemd drop-in directory for the docker service
$ sudo mkdir /etc/systemd/system/docker.service.d
-
Create a file called
/etc/systemd/system/docker.service.d/tls.conf
which contains the following contents[Service] ExecStart= ExecStart=/usr/bin/dockerd -H fd:// -H tcp://0.0.0.0:2376
-
Flush changes
$ sudo systemctl daemon-reload
-
-
If your system (Ex. Ubuntu 14.04) uses Upstart as a process manager, please follow the steps below
-
Create the
/etc/default/docker
file on your host if you don’t have one -
Open the file with your favorite editor
$ sudo vi /etc/default/docker
-
Add a
DOCKER_OPTS
variable with the following options and then save the fileDOCKER_OPTS="-D -H unix:///var/run/docker.sock -H tcp://0.0.0.0:2376"
-
- Restart docker daemon
-
For the system that uses systemd as a process manager
$ sudo systemctl restart docker
-
For the system that uses Upstart as a process manager
$ sudo service docker restart
-
Make sure that you can connect to docker daemon without sudo
$ docker ps $ docker --tlsverify -H tcp://127.0.0.1:2376 ps
If not, please check this and make sure you've followed the step above correctly.
-
Build all images
$ make
$ ./docker_start.sh
$ ./docker_stop.sh
$ ./docker_dev.sh
$ make oj_web
$ make oj_mail
$ make rm_oj_web
$ make rm_oj_mail
$ make clean