-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
124 lines (116 loc) · 4.01 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
x-environment: &py-environment
DEBUG: ${DEBUG:-True}
DEV_ENV: "True" # necessary to have nginx connect to web container
NODE_ENV: ${NODE_ENV:-development}
DATABASE_URL: postgres://postgres:postgres@db:5432/postgres
MITOL_UE_SECURE_SSL_REDIRECT: "False"
MITOL_UE_DB_DISABLE_SSL: "True"
MITOL_UE_FEATURES_DEFAULT: ${MITOPEN_FEATURES_DEFAULT:-True}
CELERY_TASK_ALWAYS_EAGER: "False"
CELERY_BROKER_URL: redis://redis:6379/4
CELERY_RESULT_BACKEND: redis://redis:6379/4
DOCKER_HOST: ${DOCKER_HOST:-missing}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
POSTGRES_PORT: ${POSTGRES_PORT:-5432}
NGINX_PORT: ${NGINX_PORT:-8073}
APISIX_PORT: ${APISIX_PORT:-9080}
KEYCLOAK_PORT: ${KEYCLOAK_PORT:-7080}
KEYCLOAK_SSL_PORT: ${KEYCLOAK_SSL_PORT:-7443}
services:
db:
image: postgres:17
ports:
- "${POSTGRES_PORT}:5432"
environment:
<<: *py-environment
redis:
image: redis:6.2
ports:
- "6379"
nginx:
image: nginx:1.27
ports:
- "${NGINX_PORT}:8073"
links:
- web
volumes:
- ./config/nginx/nginx.conf:/etc/nginx/conf.d/web.conf
- ./:/src
- django_media:/app/django_media
web:
build:
context: .
dockerfile: Dockerfile
environment:
<<: *py-environment
PORT: 8071
env_file: .env
command: ./scripts/run-django-dev.sh
stdin_open: true
tty: true
links:
- db
- redis
volumes:
- .:/src
- django_media:/var/media
celery:
build:
context: .
dockerfile: Dockerfile
environment: *py-environment
env_file: .env
command: >
/bin/bash -c '
sleep 3;
celery -A unified_ecommerce.celery:app worker -Q default -B -l ${MITOL_UE_LOG_LEVEL:-INFO} &
celery -A unified_ecommerce.celery:app worker -Q edx_content,default -l ${MITOL_UE_LOG_LEVEL:-INFO}'
links:
- db
- redis
volumes:
- .:/src
- django_media:/var/media
api:
image: apache/apisix:latest
environment:
- KEYCLOAK_REALM=${KEYCLOAK_REALM:-ol-local}
- KEYCLOAK_CLIENT_ID=${KEYCLOAK_CLIENT_ID:-apisix}
- KEYCLOAK_CLIENT_SECRET=${KEYCLOAK_CLIENT_SECRET}
- KEYCLOAK_DISCOVERY_URL=${KEYCLOAK_DISCOVERY_URL:-https://kc.odl.local:7443/realms/ol-local/.well-known/openid-configuration}
- APISIX_PORT=${APISIX_PORT:-9080}
- APISIX_SESSION_SECRET_KEY=${APISIX_SESSION_SECRET_KEY:-something_at_least_16_characters}
- UE_LOGOUT_URL=${UE_LOGOUT_URL:-http://ue.odl.local:9080/auth/logout/}
ports:
- ${APISIX_PORT}:${APISIX_PORT}
volumes:
- ./config/apisix/config.yaml:/usr/local/apisix/conf/config.yaml
- ./config/apisix/apisix.yaml:/usr/local/apisix/conf/apisix.yaml
- ./config/apisix/debug.yaml:/usr/local/apisix/conf/debug.yaml
keycloak:
image: quay.io/keycloak/keycloak:latest
profiles:
- keycloak
depends_on:
- db
ports:
- ${KEYCLOAK_PORT}:${KEYCLOAK_PORT}
- ${KEYCLOAK_SSL_PORT}:${KEYCLOAK_SSL_PORT}
environment:
- KEYCLOAK_ADMIN=${KEYCLOAK_SVC_ADMIN:-admin}
- KEYCLOAK_ADMIN_PASSWORD=${KEYCLOAK_SVC_ADMIN_PASSWORD:-admin}
networks:
default:
aliases:
- ${KEYCLOAK_SVC_HOSTNAME:-kc.odl.local}
links:
- db:uedb
command: start --verbose --features scripts --import-realm --hostname=${KEYCLOAK_SVC_HOSTNAME:-kc.odl.local} --hostname-strict=false --hostname-debug=true --https-port=${KEYCLOAK_SSL_PORT} --https-certificate-file=/etc/x509/https/tls.crt --https-certificate-key-file=/etc/x509/https/tls.key --http-enabled=true --http-port=${KEYCLOAK_PORT} --config-keystore=/etc/keycloak-store --config-keystore-password=${KEYCLOAK_SVC_KEYSTORE_PASSWORD} --db=postgres --db-url-database=keycloak --db-url-host=uedb --db-schema=public --db-password=${POSTGRES_PASSWORD:-postgres} --db-username=postgres
volumes:
- keycloak-store:/etc/keycloak-store
- ./config/keycloak/tls:/etc/x509/https
- ./config/keycloak/realms:/opt/keycloak/data/import
volumes:
django_media:
yarn-cache:
keycloak-store: