Note: This guide assumes you have followed the Installation Guide located in the README.md.
Create a docker-machine for UDOIT, get the environment commands for the new machine, and connect your shell to it:
$ docker-machine create udoit
$ docker-machine env udoit
$ eval $(docker-machine env udoit)
Then, save the IP address for the newly created docker-machine (E.g. 192.168.99.100
):
$ docker-machine ip udoit
If docker/etc/nginx/nginx.conf
doesn't exist, create it using a copy of the template:
$ cp docker/etc/nginx/nginx.template.conf docker/etc/nginx/nginx.conf
Edit docker/etc/nginx/nginx.conf
' to point to the UDOIT docker-machine's IP address by replacing both instances of
localhost
with
<your_ip_address>
Generate SSL certificates according to the naming scheme located in the nginx.conf file (nginx.key
and nginx.crt
) or use your own SSL certificates:
$ sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout docker/var/ssl/nginx.key -out docker/var/ssl/nginx.crt
Start PHP, MySQL, and NGINX:
$ docker-compose up -d
Verify everything works by navigating to
https://<your_ip_address>
The included docker-compose.yml
automatically builds the latest images of PHP 7.1-FPM, MySQL, and NGINX.
Execute PHP commands on the server using docker-compose
:
$ docker-compose exec php bash
Exit by pressing Ctrl+P
then Ctrl+Q
You may access the MySQL database using either root
or the preconfigured udoit
user on <your_ip_address>
and port 3306
.
username: root
password: udoit
username: udoit
password: udoit
Docker-Compose allows you to change build images, exposed ports, local file linkages, MySQL user accounts, etc. inside the docker-compose.yml
file.