-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
66 lines (59 loc) · 1.27 KB
/
docker-compose.yaml
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
version: "3.9"
services:
docs:
image: plebnet-compose
ports:
- "8000:8000"
build:
context: .
dockerfile: docs.Dockerfile
volumes:
- .:/code
container_name: rigly-backend-docs
environment:
SITE_NAME: ${SITE_NAME}
command:
- mkdocs
- serve
- -a
- 0.0.0.0:8000
app:
image: my-flask-app:latest
build:
context: app
dockerfile: app.Dockerfile
depends_on:
- local_db
environment:
- DB_HOST=local_db
- DB_PORT=${DB_PORT_LOCAL}
- DB_USER=${DB_USER_LOCAL}
- DB_PASS=${DB_PASS_LOCAL}
- DB_NAME=${DB_NAME_LOCAL}
volumes:
- ./app:/usr/src/app
ports:
- "8050:8050"
local_db:
image: postgres
restart: always
volumes:
- pgdata:/var/lib/postgresql/data/
environment:
POSTGRES_USER: ${DB_USER_LOCAL}
POSTGRES_PASSWORD: ${DB_PASS_LOCAL}
POSTGRES_DB: ${DB_NAME_LOCAL}
TZ: ${TZ}
POSTGRES_HOST_AUTH_METHOD: trust
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -U ${DB_USER_LOCAL} -d ${DB_NAME_LOCAL} -h ${DB_HOST_LOCAL} -p ${DB_PORT_LOCAL}",
]
interval: 10s
timeout: 5s
retries: 5
hostname: ${DB_HOST_LOCAL}
volumes:
pgdata: