-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcompose.yml
45 lines (41 loc) · 1.16 KB
/
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
services:
abandonauth:
network_mode: "host"
build:
context: src/api
dockerfile: Dockerfile
args: # Enables hot reloading
- uvicorn_extras=--reload
env_file:
- ".env"
depends_on:
- database
volumes: # mount the source code as a volume, so we can use hot reloading
- "./src/api/abandonauth:/app/abandonauth:ro"
- "./prisma:/app/prisma:ro"
website:
network_mode: "host"
build:
context: ./src/website
dockerfile: Dockerfile
args:
ABANDON_AUTH_URL: ${ABANDON_AUTH_URL}
ABANDON_AUTH_DEVELOPER_APP_ID: ${ABANDON_AUTH_DEVELOPER_APP_ID}
GITHUB_REDIRECT: ${GITHUB_REDIRECT}
DISCORD_REDIRECT: ${DISCORD_REDIRECT}
database:
image: "postgres:${POSTGRES_VERSION:-15-alpine}"
network_mode: "host"
volumes:
- postgres_data:/var/lib/postgresql/data/
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 2s
timeout: 1s
retries: 5
environment:
- "POSTGRES_HOST=${POSTGRES_HOST}"
- "POSTGRES_PASSWORD=${POSTGRES_PASSWORD}"
- "POSTGRES_USER=${POSTGRES_USER}"
volumes:
postgres_data: