Multi container web app using Docker-Compose
Install docker and docker-compose
Add your own .env file at the root of the srcs directory setting your own values for the following docker environment variables:
DOMAIN_NAME=value
# certificates
CERTS_=value
# MYSQL SETUP
MYSQL_ROOT_PASSWORD=value
MYSQL_ADMIN_USER=value
MYSQL_ADMIN_USER_PASSWORD=value
MYSQL_USER=value
MYSQL_USER_PASSWORD=value
MYSQL_DB_NAME=value
# WP SETUP
MDB_HOST=db:3306
REDIS_HOST=redis
REDIS_PORT=6379
# NGINX SETUP
WP_HOST=wp:9000
# BONUS
# FTP
FTP_USER=value
FTP_PASS=value
FTP_DOMAIN_NAME=value
# STATIC
STATIC_DOMAIN_NAME=value
STATIC_PORT=value
# REGISTRY
REGISTRY_DOMAIN_NAME=value
REGISTRY_PORT=value
Run make
or make debug
from the directory where Makefile is located.
Run make clean
from the directory where Makefile is located.
This project creates the following docker images in your system:
- ftp
- mariadb
- registry
- static
- nginx
- redis
- wordpress
- adminer
- debian
From these, the only official image that is downloaded from the official Docker Hub is debian. The rest are all made by me using Dockerfiles. It is important to note, that all the custom images that I made, with the exception of ftp and static, have an official and more secure version that can be downloaded from Docker Hub, like redis.
To delete local docker images individually:
- Run
docker image ls
- Copy the IMAGE ID of the image to remove.
- Run
docker image rm IMAGE_ID
replacing IMAGE_ID with the value copied previously.
To delete more than one local image at a time:
- Run
docker image ls
- Copy and paste all the IMAGE ID of the images to delete in this command
docker rmi IMAGE_ID IMAGE_ID IMAGE_ID
replacing each IMAGE_ID with each copied value. Add as much IMAGE_ID as needed.
To remove all local docker images from your system:
Run docker rmi -f $(docker images -aq)
Be careful with this command!!! It will remove every docker image in your system, including others not related to this project.
To uninstall docker and/or docker-compose, look at the bottom of the installation page/s for your system.