-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
60 lines (54 loc) · 1.32 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
x-service-defaults: &service-defaults
build: .
depends_on:
db:
condition: service_healthy
restart: always
environment:
ONEDRIVE_CLIENT_ID: ${ONEDRIVE_CLIENT_ID}
ONEDRIVE_CLIENT_SECRET: ${ONEDRIVE_CLIENT_SECRET}
ONEDRIVE_DRIVE_ID: ${ONEDRIVE_DRIVE_ID}
ONEDRIVE_TENANT_ID: ${ONEDRIVE_TENANT_ID}
DATABASE_USER: ${DATABASE_USER:-postgres}
DATABASE_PASSWORD: ${DATABASE_PASSWORD:-postgres}
DATABASE_HOST: db
DATABASE_NAME: ${POSTGRES_DB:-document_transfer}
volumes:
- .:/opt/app
services:
api:
<<: *service-defaults
ports:
- "3000:3000"
db:
image: postgres:16
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
POSTGRES_DB: ${POSTGRES_DB:-document_transfer}
ports:
- "5432:5432"
volumes:
- postgres:/var/lib/postgresql/data
healthcheck:
test:
- CMD-SHELL
- "pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-document_transfer}"
interval: 10s
retries: 5
start_period: 30s
timeout: 10s
worker:
<<: *service-defaults
command: ./script/worker run
docs:
profiles:
- docs
build:
dockerfile: docs.dockerfile
ports:
- "8000:8000"
volumes:
- .:/docs
volumes:
postgres: