All the containers run on their own seperated network. The network is configured in a bridge configuration
We have 2 docker compose configuration files, 1 for developing and 1 for production.
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d --build
docker-compose up --build -d
docker-compose down
Remove docker containers, remember to shutdown first.
docker-compose rm
Remove all unused container volumes.
docker volume prune
docker-compose logs -f astro
docker-compose logs -f fastify
docker-compose logs -f nginx
docker-compose logs -f mariadb
docker-compose logs -f redis
docker-compose exec astro /bin/bash
docker-compose exec fastify /bin/bash
docker-compose exec nginx /bin/bash
docker-compose exec mariadb /bin/bash
docker-compose exec redis /bin/bash
This container is running our mariadb server.
Port 3306 is exposed to the host.
The container running our redis caching server.
Port 6379 is exposed to the host.
This container is acting as a proxy into our nodejs server.
Port 80 and 443 is exposed to the host.
The container running our Astro frontend.
No ports are exposed to the host.
Astro exposes port 3000 to the local docker network, this port will then be tunneled to port 80 & 443 via the nginx container.
The container running our Fastify backend.
No ports are exposed to the host.
Fastify exposes port 3000 to the local docker network, this port will then be tunneled to port 80 & 443 via the nginx container.