forked from gestaogovbr/api-pgd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
94 lines (93 loc) · 2.79 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
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
version: '3'
services:
db-api-pgd:
image: postgres:15
ports:
- "5432"
volumes:
- ./database:/var/lib/postgresql/data
- ./init/init.sql:/docker-entrypoint-initdb.d/init.sql
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: api_pgd
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d api_pgd"]
interval: 10s
timeout: 5s
retries: 3
web:
build: ./
# image: api-pgd:latest
depends_on:
db-api-pgd:
condition: service_healthy
ports:
- "5057:5057"
volumes:
- ./:/home/api-pgd
environment:
WEB_URI_SCHEME: http
WEB_HOST_NAME: web
WEB_PORT: 5057
SQLALCHEMY_DATABASE_URL: postgresql+psycopg://postgres:postgres@db-api-pgd:5432/api_pgd
MAIL_USERNAME: [email protected]
MAIL_FROM: [email protected]
MAIL_PORT: "25"
MAIL_SERVER: smtp.email-provider.gov.br
MAIL_FROM_NAME: API PGD
MAIL_PASSWORD: ""
FIEF_BASE_TENANT_URL: http://fief:8000
FIEF_CLIENT_ID: ${FIEF_CLIENT_ID}
FIEF_CLIENT_SECRET: ${FIEF_CLIENT_SECRET}
FIEF_MAIN_ADMIN_API_KEY: ${FIEF_MAIN_ADMIN_API_KEY}
FIEF_MAIN_USER_EMAIL: ${FIEF_MAIN_USER_EMAIL}
command:
./run_after_db.py "cd src && uvicorn api:app --host 0.0.0.0 --port 5057 --reload"
healthcheck:
test: ["CMD", "curl", "-f", "http://0.0.0.0:5057"]
interval: 10s
timeout: 5s
retries: 3
fief:
build:
context: ./
dockerfile: Dockerfile.fief
# image: ghcr.io/fief-dev/fief:latest
depends_on:
db-api-pgd:
condition: service_healthy
ports:
- "8000:8000"
environment:
CLIENT_REDIRECT_URI_SSL_REQUIRED: False
SECRET: ${SECRET}
FIEF_CLIENT_ID: ${FIEF_CLIENT_ID}
FIEF_CLIENT_SECRET: ${FIEF_CLIENT_SECRET}
ENCRYPTION_KEY: ${ENCRYPTION_KEY}
FIEF_MAIN_ADMIN_API_KEY: ${FIEF_MAIN_ADMIN_API_KEY}
PORT: "8000"
ROOT_DOMAIN: fief:8000
FIEF_DOMAIN: fief:8000
FIEF_MAIN_USER_EMAIL: ${FIEF_MAIN_USER_EMAIL}
FIEF_MAIN_USER_PASSWORD: ${FIEF_MAIN_USER_PASSWORD}
CSRF_COOKIE_SECURE: False
SESSION_DATA_COOKIE_SECURE: False
USER_LOCALE_COOKIE_SECURE: False
LOGIN_HINT_COOKIE_SECURE: False
LOGIN_SESSION_COOKIE_SECURE: False
REGISTRATION_SESSION_COOKIE_SECURE: False
SESSION_COOKIE_SECURE: False
FIEF_ADMIN_SESSION_COOKIE_SECURE: False
DATABASE_TYPE: POSTGRESQL
DATABASE_HOST: db-api-pgd
DATABASE_PORT: "5432"
DATABASE_USERNAME: postgres
DATABASE_PASSWORD: postgres
DATABASE_NAME: fief
TELEMETRY_ENABLED: False
healthcheck:
test: ["CMD", "curl", "-f", "http://fief:8000/login"]
interval: 10s
timeout: 5s
retries: 3