forked from gestaogovbr/api-pgd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
91 lines (90 loc) · 2.73 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
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_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
web:
build: ./
image: api-pgd:latest
depends_on:
- db-api-pgd
ports:
- "5057:5057"
volumes:
- ./:/home/api-pgd
environment:
- URI_SCHEME=${URI_SCHEME}
- HOST_NAME=${HOST_NAME}
- PORT=5057
- SQLALCHEMY_DATABASE_URL=postgresql+psycopg://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db-api-pgd:5432/${POSTGRES_DB}
- MAIL_USERNAME=${MAIL_USERNAME}
- MAIL_FROM=${MAIL_FROM}
- MAIL_PORT=${MAIL_PORT}
- MAIL_SERVER=${MAIL_SERVER}
- MAIL_FROM_NAME=${MAIL_FROM_NAME}
- MAIL_PASSWORD=${MAIL_PASSWORD}
- FIEF_BASE_TENANT_URL=${FIEF_BASE_TENANT_URL}
- FIEF_CLIENT_ID=${FIEF_CLIENT_ID}
- FIEF_CLIENT_SECRET=${FIEF_CLIENT_SECRET}
- FIEF_MAIN_ADMIN_API_KEY=${FIEF_MAIN_ADMIN_API_KEY}
command:
./run_after_db.py "cd src && uvicorn api:app --host 0.0.0.0 --port 5057 --reload"
networks:
- data
fief:
image: ghcr.io/fief-dev/fief:latest
depends_on:
- db-api-pgd
ports:
- "8000:8000"
environment:
- SECRET=${FIEF_SECRET}
- FIEF_CLIENT_ID=${FIEF_CLIENT_ID}
- FIEF_CLIENT_SECRET=${FIEF_CLIENT_SECRET}
- ENCRYPTION_KEY=${FIEF_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_USER}
- DATABASE_PASSWORD=${POSTGRES_PASSWORD}
- DATABASE_NAME=${FIEF_DB}
- TELEMETRY_ENABLED=False
networks:
- data
pgadmin:
container_name: pgadmin
image: dpage/pgadmin4
depends_on:
- db-api-pgd
environment:
- PGADMIN_DEFAULT_PASSWORD=admin
ports:
- "5050:80"
volumes:
- ./pgadmin_data/servers.json:/pgadmin4/servers.json
- ./pgadmin_data/pgadmin:/var/lib/pgadmin
networks:
data: