-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
47 lines (47 loc) · 1.35 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
services:
gauth-db:
container_name: gauth-db
image: postgres:16.4-alpine
restart: unless-stopped
environment:
POSTGRES_PASSWORD: ${DB_PASS-password}
POSTGRES_USER: ${DB_USER-postgres}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER-postgres}"]
interval: 1s
timeout: 5s
volumes:
- ./db/data:/var/lib/postgresql/data
ports:
- ${DB_BIND_PORT-5432}:5432
gauth-server:
container_name: gauth-server
build:
context: .
dockerfile: ./docker/dev/server.dockerfile
restart: unless-stopped
ports:
- ${PORT-3000}:${PORT-3000}
develop:
watch:
- action: sync
path: ./server
target: /app
- action: rebuild
path: ./server
depends_on:
- gauth-db
environment:
- HOST=${HOST}
- PORT=${PORT-3000}
- MODE=${MODE-dev}
- PASS_SALT=${PASS_SALT-hotdogwater}
- DB_HOST=${DB_HOST-gauth-db}
- DB_PORT=${DB_PORT-5432}
- DB_PASS=${DB_PASS-password}
- DB_USER=${DB_USER-postgres}
- DB_NAME=${DB_USER-postgres}
- DB_SSLMODE=${DB_SSLMODE-disable}
- USER_TOKEN_SECRET=${USER_TOKEN_SECRET-12345678901234567890123456789012}
- USER_ACCESS_TOKEN_DURATION=${USER_ACCESS_TOKEN_DURATION-5m}
- USER_REFRESH_TOKEN_DURATION=${USER_REFRESH_TOKEN_DURATION-10m}