-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
72 lines (68 loc) · 1.9 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
services:
nginx:
build: ./src/nginx
restart: always
container_name: fvb_nginx
ports:
- "8443:8443" # Client on HTTPS
- "9443:9443" # Backend on HTTPS
volumes:
- ./src/nginx/fvb.conf:/etc/nginx/conf.d/fvb.conf:ro
depends_on:
- client
- backend
backend:
build: ./src/backend
restart: always
container_name: fvb_backend
command: 'uvicorn main:app --host 0.0.0.0 --port ${FVB_BACKEND_PORT:-8000} --workers 4'
environment:
FVB_DATABASE_HOST: ${FVB_DATABASE_HOST:-db}
FVB_DATABASE_NAME: ${FVB_DATABASE_NAME:-fvb}
FVB_DATABASE_USER: ${FVB_DATABASE_USER:-fvb}
FVB_DATABASE_PASSWORD: ${FVB_DATABASE_PASSWORD:-fvb}
FVB_BACKEND_BASEURL: ${FVB_BACKEND_BASEURL:-http://localhost}
FVB_BACKEND_PORT: ${FVB_BACKEND_PORT:-8000}
FVB_CORS_ORIGINS: ${FVB_CORS_ORIGINS:-["http://127.0.0.1:9500"]}
ports:
- "8000:8000"
depends_on:
- db
client:
build:
context: ./src/client
dockerfile: Dockerfile
target: prod-pwa-stage
args:
FVB_BACKEND_BASEURL: ${FVB_BACKEND_BASEURL:-http://localhost}
FVB_BACKEND_PORT: ${FVB_BACKEND_PORT:-8000}
restart: always
container_name: fvb_client
ports:
- "8080:8080"
depends_on:
- backend
db:
image: mysql:8.0
container_name: fvb_db
restart: always
environment:
MYSQL_DATABASE: ${FVB_DATABASE_NAME:-fvb}
MYSQL_ROOT_USER: ${FVB_DATABASE_USER:-root}
MYSQL_ROOT_PASSWORD: ${FVB_DATABASE_PASSWORD:-fvb}
ports:
- "3306:3306"
volumes:
- ./data/fvb.sql:/docker-entrypoint-initdb.d/fvb.sql:ro
phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
container_name: fvb_phpmyadmin
restart: always
environment:
PMA_HOST: db
PMA_PORT: 3306
MYSQL_ROOT_PASSWORD: ${FVB_DATABASE_PASSWORD:-fvb}
ports:
- "7070:80"
depends_on:
- db