59 lines
1.3 KiB
YAML
59 lines
1.3 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
|
|
depends_on:
|
|
- api
|
|
|
|
|
|
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
|
|
volumes:
|
|
- notes-db-volume:/var/lib/mysql
|
|
healthcheck:
|
|
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
|
|
timeout: 10s
|
|
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
|
|
|
|
volumes:
|
|
notes-db-volume: |