SimpleNotes/docker-compose.yml

52 lines
1.2 KiB
YAML

version: '2.2'
services:
nginx:
image: nginx:latest
container_name: notes-nginx
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Brussels
volumes:
- ./frontend/dist:/usr/share/nginx/html
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/server.conf:/etc/nginx/server.conf
ports:
- 80:80
- 443:443
db:
image: mariadb
container_name: notes-mariadb
env_file:
- .env
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Brussels
ports:
# This is only for testing
- 3306:3306
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 20s
retries: 10
api:
build: ./api
container_name: notes-api
ports:
# This is only for testing
- 8081:8081
env_file:
- .env
environment:
- TZ=Europe/Brussels
- MYSQL_HOST=db
depends_on:
db:
condition: service_healthy