Postgres Database Dockercompose
1
#Author: Kurian Benoy
2
version: '3.7'
3
4
services:
5
forms-flow-data-analysis-db:
6
image: "postgres:13"
7
environment:
8
POSTGRES_USER: ${DATA_ANALYSIS_DB_USER}
9
POSTGRES_PASSWORD: ${DATA_ANALYSIS_DB_PASSWORD}
10
POSTGRES_DB: ${DATA_ANALYSIS_DB_NAME}
11
POSTGRES_HOST_AUTH_METHOD: "trust"
12
volumes:
13
- db-data:/var/lib/postgresql/data
14
networks:
15
- forms-flow-data-analysis-api-network
16
ports:
17
- '5430:5432'
18
19
forms-flow-data-analysis-api:
20
build:
21
context: ./
22
dockerfile: Dockerfile
23
restart: unless-stopped
24
links:
25
- forms-flow-data-analysis-db
26
ports:
27
- '5000:5000'
28
volumes:
29
- ./:/app:rw
30
environment:
31
DATABASE_URL: ${DATA_ANALYSIS_DB_URL}
32
JWT_OIDC_WELL_KNOWN_CONFIG: ${KEYCLOAK_URL}/auth/realms/${KEYCLOAK_URL_REALM:-forms-flow-ai}/.well-known/openid-configuration
33
JWT_OIDC_ALGORITHMS: 'RS256'
34
JWT_OIDC_JWKS_URI: ${KEYCLOAK_URL}/auth/realms/${KEYCLOAK_URL_REALM:-forms-flow-ai}/protocol/openid-connect/certs
35
JWT_OIDC_ISSUER: ${KEYCLOAK_URL}/auth/realms/${KEYCLOAK_URL_REALM:-forms-flow-ai}
36
JWT_OIDC_AUDIENCE: ${KEYCLOAK_WEB_CLIENT_ID:-forms-flow-web}
37
JWT_OIDC_CACHING_ENABLED: 'True'
38
JWT_OIDC_JWKS_CACHE_TIMEOUT: 300
39
DATA_ANALYSIS_API_BASE_URL: ${DATA_ANALYSIS_API_BASE_URL}
40
stdin_open: true # -i
41
tty: true # -t
42
networks:
43
- forms-flow-data-analysis-api-network
44
45
networks:
46
forms-flow-data-analysis-api-network:
47
driver: 'bridge'
48
49
volumes:
50
db-data:
51
Copied!
Last modified 3mo ago
Copy link