forked from letsgetrusty/live-bootcamp-project
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcompose.yml
More file actions
78 lines (78 loc) · 2.82 KB
/
compose.yml
File metadata and controls
78 lines (78 loc) · 2.82 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
services:
app-service:
image: feamcor/app-service
restart: always
environment:
AUTH_SERVICE_IP: "localhost"
AUTH_SERVICE_HOST_NAME: "auth-service"
ports:
- "${APP_SERVICE_PORT:-8000}:8000"
depends_on:
auth-service:
condition: service_started
auth-service:
image: feamcor/auth-service
restart: always
environment:
AUTH_SERVICE_CACHE_ENGINE: "redis"
AUTH_SERVICE_CACHE_HOST: "cache"
AUTH_SERVICE_CACHE_PORT: ${AUTH_SERVICE_CACHE_PORT:-6379}
AUTH_SERVICE_DB_ENGINE: "postgres"
AUTH_SERVICE_DB_HOST: "db"
AUTH_SERVICE_DB_NAME: "${AUTH_SERVICE_DB_NAME:-letsgetrusty}"
AUTH_SERVICE_DB_PASSWORD: "${AUTH_SERVICE_DB_PASSWORD}"
AUTH_SERVICE_DB_POOL_MAX: ${AUTH_SERVICE_DB_POOL_MAX:-100}
AUTH_SERVICE_DB_POOL_MIN: ${AUTH_SERVICE_DB_POOL_MIN:-1}
AUTH_SERVICE_DB_PORT: ${AUTH_SERVICE_DB_PORT:-5432}
AUTH_SERVICE_DB_USER: "${AUTH_SERVICE_DB_USER}"
AUTH_SERVICE_EMAIL_SERVICE: "postmark"
AUTH_SERVICE_EMAIL_API_KEY: "${AUTH_SERVICE_EMAIL_API_KEY}"
AUTH_SERVICE_EMAIL_API_TIMEOUT: ${AUTH_SERVICE_EMAIL_API_TIMEOUT:-1000}
AUTH_SERVICE_EMAIL_API_URL: "${AUTH_SERVICE_EMAIL_API_URL:-https://api.postmarkapp.com/email}"
AUTH_SERVICE_EMAIL_SENDER: "${AUTH_SERVICE_EMAIL_SENDER}"
AUTH_SERVICE_EMAIL_STREAM: "${AUTH_SERVICE_EMAIL_STREAM:-outbound}"
AUTH_SERVICE_JWT_SECRET: "${AUTH_SERVICE_JWT_SECRET}"
AUTH_SERVICE_JWT_TTL: ${AUTH_SERVICE_JWT_TTL:-900}
AUTH_SERVICE_LOG: "${AUTH_SERVICE_LOG:-info}"
APP_SERVICE_PORT: ${APP_SERVICE_PORT:-8000}
AUTH_SERVICE_HOST_IPV4: "${AUTH_SERVICE_HOST_IPV4:-0.0.0.0}"
AUTH_SERVICE_PORT: ${AUTH_SERVICE_PORT:-3000}
AUTH_SERVICE_TFA_TTL: ${AUTH_SERVICE_TFA_TTL:-300}
ports:
- "${AUTH_SERVICE_PORT:-3000}:3000"
depends_on:
db:
condition: service_healthy
cache:
condition: service_healthy
db:
image: postgres:latest
restart: always
environment:
POSTGRES_DB: "${AUTH_SERVICE_DB_NAME:-letsgetrusty}"
POSTGRES_PASSWORD: "${AUTH_SERVICE_DB_PASSWORD}"
POSTGRES_USER: "${AUTH_SERVICE_DB_USER}"
ports:
- "127.0.0.1:${AUTH_SERVICE_DB_PORT:-5432}:5432"
- "[::1]:${AUTH_SERVICE_DB_PORT:-5432}:5432"
volumes:
- db_data:/var/lib/postgresql
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U ${AUTH_SERVICE_DB_USERNAME:-administrator} -d ${AUTH_SERVICE_DB_DATABASE:-letsgetrusty}" ]
interval: 5s
timeout: 5s
retries: 5
cache:
image: redis:latest
restart: always
ports:
- "127.0.0.1:${AUTH_SERVICE_CACHE_PORT:-6379}:6379"
- "[::1]:${AUTH_SERVICE_CACHE_PORT:-6379}:6379"
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 5s
timeout: 3s
retries: 5
volumes:
db_data:
driver: local