forked from MaibornWolff/SecObserve
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-prod-test.yml
87 lines (83 loc) · 2.96 KB
/
docker-compose-prod-test.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
volumes:
prod_mysql_data:
prod_postgres_data:
services:
frontend:
build:
context: .
dockerfile: ./docker/frontend/prod/Dockerfile
args:
VERSION: prod_test
image: secobserve_frontend_prod
environment:
API_BASE_URL: ${SO_API_BASE_URL:-http://localhost:5000/api}
OIDC_ENABLE: ${SO_OIDC_ENABLE:-false}
OIDC_AUTHORITY: ${SO_OIDC_AUTHORITY:-dummy}
OIDC_CLIENT_ID: ${SO_OIDC_CLIENT_ID:-dummy}
OIDC_REDIRECT_URI: ${SO_OIDC_REDIRECT_URI:-http://localhost:3000}
OIDC_POST_LOGOUT_REDIRECT_URI: ${SO_OIDC_POST_LOGOUT_REDIRECT_URI:-http://localhost:3000}
ports:
- "3000:3000"
backend:
build:
context: .
dockerfile: ./docker/backend/prod/django/Dockerfile
args:
VERSION: prod_test
image: secobserve_backend_prod
depends_on:
- postgres
environment:
# --- Admin user ---
ADMIN_USER: ${SO_ADMIN_USER:-admin}
ADMIN_PASSWORD: ${SO_ADMIN_PASSWORD:-admin}
ADMIN_EMAIL: ${SO_ADMIN_EMAIL:[email protected]}
# --- Gunicorn ---
GUNICORN_WORKERS: ${SO_GUNICORN_WORKERS:-3}
GUNICORN_THREADS: ${SO_GUNICORN_THREADS:-10}
# --- Database ---
DATABASE_ENGINE: ${SO_DATABASE_ENGINE:-django.db.backends.postgresql}
DATABASE_HOST: ${SO_DATABASE_HOST:-postgres}
DATABASE_PORT: ${SO_DATABASE_PORT:-5432}
DATABASE_DB: ${SO_DATABASE_DB:-secobserve}
DATABASE_USER: ${SO_DATABASE_USER:-secobserve}
DATABASE_PASSWORD: ${SO_DATABASE_PASSWORD:-secobserve}
# --- Security ---
ALLOWED_HOSTS: ${SO_ALLOWED_HOSTS:-localhost}
CORS_ALLOWED_ORIGINS: ${SO_CORS_ALLOWED_ORIGINS:-http://localhost:3000}
DJANGO_SECRET_KEY: ${SO_DJANGO_SECRET_KEY:-NxYPEF5lNGgk3yonndjSbwP77uNJxOvfKTjF5aVBqsHktNlf1wfJHHvJ8iifk32r}
FIELD_ENCRYPTION_KEY: ${SO_FIELD_ENCRYPTION_KEY:-DtlkqVb3wlaVdJK_BU-3mB4wwuuf8xx8YNInajiJ7GU=}
# --- OpenID Connect ---
OIDC_AUTHORITY: ${SO_OIDC_AUTHORITY:-}
OIDC_CLIENT_ID: ${SO_OIDC_CLIENT_ID:-}
OIDC_USERNAME: ${SO_OIDC_USERNAME:-}
OIDC_FIRST_NAME: ${SO_OIDC_FIRST_NAME:-}
OIDC_LAST_NAME: ${SO_OIDC_LAST_NAME:-}
OIDC_FULL_NAME: ${SO_OIDC_FULL_NAME:-}
OIDC_EMAIL: ${SO_OIDC_EMAIL:-}
OIDC_GROUPS: ${SO_OIDC_GROUPS:-}
ports:
- "5000:5000"
mysql:
image: mysql:8.4.3
profiles:
- mysql
environment:
MYSQL_RANDOM_ROOT_PASSWORD: ${SO_MYSQL_RANDOM_ROOT_PASSWORD:-yes}
MYSQL_DATABASE: ${SO_MYSQL_DATABASE:-secobserve}
MYSQL_USER: ${SO_MYSQL_USER:-secobserve}
MYSQL_PASSWORD: ${MYSQL_PASSWORD:-secobserve}
volumes:
- prod_mysql_data:/var/lib/mysql
ports:
- "3306:3306"
postgres:
image: postgres:15.8-alpine
environment:
POSTGRES_DB: ${SO_POSTGRES_DB:-secobserve}
POSTGRES_USER: ${SO_POSTGRES_USER:-secobserve}
POSTGRES_PASSWORD: ${SO_POSTGRES_PASSWORD:-secobserve}
volumes:
- prod_postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"