-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose-dev.yml
70 lines (66 loc) · 2.08 KB
/
docker-compose-dev.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
volumes:
dev_huey_data:
dev_postgres_data:
dev_node_modules:
services:
frontend:
build:
context: .
dockerfile: ./docker/frontend/dev/Dockerfile
image: secobserve_frontend_dev
ports:
- "3000:3000"
volumes:
- ./frontend/:/app
- dev_node_modules:/app/node_modules
command : sh -c "npm run start -- --host"
backend:
build:
context: .
dockerfile: ./docker/backend/dev/django/Dockerfile
image: secobserve_backend_dev
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]}
# --- 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=}
# --- Development ---
USE_DOCKER: yes
volumes:
- ./backend:/app
- dev_huey_data:/var/lib/huey
ports:
- "8000:8000"
command: /start
postgres:
image: postgres:15.10-alpine
volumes:
- dev_postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_DB: ${SO_POSTGRES_DB:-secobserve}
POSTGRES_USER: ${SO_POSTGRES_USER:-secobserve}
POSTGRES_PASSWORD: ${SO_POSTGRES_PASSWORD:-secobserve}
ports:
- "5432:5432"
mailhog:
image: mailhog/mailhog:v1.0.1
profiles:
- mailhog
entrypoint: ["/bin/sh", "-c", "MailHog &>/dev/null"]
ports:
- "1025:1025"
- "8025:8025"