-
Notifications
You must be signed in to change notification settings - Fork 11
/
docker-compose.yml
executable file
·60 lines (56 loc) · 1.52 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
version: '3'
volumes:
reports:
data:
services:
db:
image: postgres:11
healthcheck:
test: [ "CMD", "pg_isready", "-q", "-d", "postgres", "-U", "postgres" ]
timeout: 45s
interval: 10s
retries: 10
restart: always
environment:
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
- MREPORT_DATABASE_NAME
- MREPORT_DATABASE_USER
- MREPORT_DATABASE_PWD
- MREPORT_DATABASE_SCHEMA
volumes:
- ./docker/db/init.sh:/docker-entrypoint-initdb.d/init.sh
- ./docker/db/script.sql:/tmp/script.sql
- data:/var/lib/postgresql/data
ports:
- ${MREPORT_DATABASE_LOCALHOST_PORT}:${MREPORT_DATABASE_HOST_PORT}
backend:
build:
context: .
dockerfile: docker/Dockerfile-backend
image: mviewer/mreport:latest
environment:
- MREPORT_DATABASE_HOST
- MREPORT_DATABASE_HOST_PORT
- MREPORT_DATABASE_NAME
- MREPORT_DATABASE_USER
- MREPORT_DATABASE_PWD
- MREPORT_DATABASE_SCHEMA
volumes:
- "reports:/home/apprunner/backend/reports"
depends_on:
- "db"
frontend:
image: nginx:1.19
volumes:
- "./docker/nginx:/etc/nginx/templates"
- "reports:/var/www/reports"
- "./frontend/static/:/var/www/static"
- "./frontend/templates/:/var/www/templates"
environment:
- NGINX_PORT
ports:
- ${MREPORT_WEB_HOST_PORT}:${NGINX_PORT}
depends_on:
- "backend"