2023-11-16 13:55:00 +00:00
|
|
|
version: '3.8'
|
|
|
|
services:
|
2023-11-26 17:34:24 +00:00
|
|
|
|
|
|
|
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
|
2023-12-09 21:21:44 +00:00
|
|
|
- DOCKER_ENV=true
|
2023-11-26 17:34:24 +00:00
|
|
|
volumes:
|
|
|
|
- ./certs:/certs
|
2023-12-09 21:21:44 +00:00
|
|
|
- ./storage:/storage
|
2023-11-26 17:34:24 +00:00
|
|
|
|
|
|
|
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:
|