forked from con2/kompassi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
100 lines (99 loc) · 2.74 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
services:
router:
image: busybox
command: "sleep infinity"
init: true
# note: frontend, backend and minio have network_mode: service:router
# because they to reach backend and minio at same address as browser
# cannot publish ports from container that has this network_mode
# also need to use separate router container so backend can restart
# without breaking connectivity
# see #357 #375 #408
ports:
- 3000:3000
- 8000:8000
- 9000:9000
# minio console, uncomment if you need it
# - 9001:9001
backend:
build: backend
init: true
command: python manage.py docker_start
restart: unless-stopped
network_mode: service:router
depends_on:
- redis
- postgres
volumes:
- ./backend:/usr/src/app
- ./dev-secrets:/usr/src/app/dev-secrets:rw
environment: &environment
PYTHONUNBUFFERED: 1
DEBUG: 1
BROKER_URL: redis://redis/1
CACHE_URL: rediscache://redis/1
ALLOWED_HOSTS: "*"
MINIO_BUCKET_NAME: kompassi
MINIO_ACCESS_KEY_ID: kompassi
MINIO_SECRET_ACCESS_KEY: kompassi
MINIO_ENDPOINT_URL: http://localhost:9000
KOMPASSI_GENERATE_OIDC_RSA_PRIVATE_KEY_PATH: dev-secrets/id_rsa.key
celery:
build: backend
init: true
command: celery -A kompassi.celery_app:app worker
depends_on:
- redis
- postgres
volumes:
- ./backend:/usr/src/app:ro
- ./dev-secrets:/usr/src/app/dev-secrets:rw
environment:
<<: *environment
frontend:
build:
context: frontend
dockerfile: dev.Dockerfile
init: true
network_mode: service:router
depends_on:
- backend
volumes:
- ./frontend/src:/usr/src/app/src
environment:
NEXT_PUBLIC_KOMPASSI_BASE_URL: http://localhost:8000
NEXTAUTH_URL: http://localhost:3000
NEXTAUTH_SECRET: eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
postgres:
# image: postgres
build: backend/kompassi/sql/
init: true
# uncomment if you need to access postgres from host
# note: you can use `docker compose exec postgres psql -U kompassi` to access psql cli
# ports:
# - 5432:5432
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_USER: kompassi
POSTGRES_PASSWORD: secret
POSTGRES_DB: kompassi
redis:
image: redis
init: true
volumes:
- redis-data:/data
minio:
image: minio/minio
entrypoint: /usr/bin/env
command: sh -c 'mkdir -p /data/kompassi && minio server /data --console-address ":9001"'
network_mode: service:router
volumes:
- minio-data:/data
environment:
MINIO_ROOT_USER: kompassi
MINIO_ROOT_PASSWORD: kompassi
volumes:
postgres-data: {}
redis-data: {}
minio-data: {}