SARBase/docker-compose.yml

44 lines
815 B
YAML
Raw Normal View History

2023-11-16 13:55:00 +00:00
version: '3.8'
services:
flask-app:
build:
context: .
dockerfile: Dockerfile-app
2023-11-16 13:55:00 +00:00
depends_on:
- db
environment:
- FLASK_ENV=development
2023-11-16 14:08:08 +00:00
- DATABASE_URL=mysql+mysqlconnector://sarbaseuser:password@db/sarbaseapp
- DOCKER_ENV=true
volumes:
- ./certs:/certs
- ./storage:/storage
nginx:
build:
context: .
dockerfile: Dockerfile-nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./certs:/certs
depends_on:
- flask-app
2023-11-16 13:55:00 +00:00
db:
image: mysql:8.0
volumes:
- db-data:/var/lib/mysql
- ./init-db:/docker-entrypoint-initdb.d
environment:
2023-11-16 14:08:08 +00:00
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: sarbaseapp
MYSQL_USER: sarbaseuser
2023-11-16 13:55:00 +00:00
MYSQL_PASSWORD: password
volumes:
db-data: