mlrcbsousa / Inception

42 school Inception project
1 stars 0 forks source link

Inception

Set up a small infrastructure composed of WordPress with LEMP Stack (Nginx, MariaDB and PHP) using docker-compose.

Docker

Add docker group to login user in your virtual machine.

sudo adduser msousa docker
sudo reboot

Environment variables

Make your own version of the .env.example file:

cp srcs/.env.example srcs/.env

Fill in the passwords.

Run

Build and start project

make

Bring infrastructure down

make down

Start without re-building

make up

Login Domain

Hosts added as part of up command, can be accessed via:

make hosts

Nginx

Generate Certificate Authority (CA) .key and .crt files, server .key and server .crt files:

make certs

Run as part of all command.

Manually add certificate to the browser.

Debug

Run a sh shell inside one of the containers:

make mariadb
make wordpress
make nginx

Recreate one service:

cd srcs && docker-compose up -d --force-recreate --build --no-deps nginx