-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
72 lines (68 loc) · 1.84 KB
/
docker-compose.yml
File metadata and controls
72 lines (68 loc) · 1.84 KB
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
services:
frontend:
build: ./frontend
container_name: react-frontend
ports:
- "${FRONTEND_PORT}:${FRONTEND_PORT}"
# [rsync copy] sh -c "rsync -a /usr/src/cache/node_modules/ /app/node_modules/
# [vanilla copy] sh -c "cp -r /usr/src/cache/node_modules/. /app/node_modules/
# command: "cp -r /usr/src/cache/node_modules/. /app/node_modules/ && npm run dev -- --host --port ${FRONTEND_PORT}"
volumes:
- ./frontend:/app
environment:
- FRONTEND_PORT=${FRONTEND_PORT}
- CHOKIDAR_USEPOLLING=true
depends_on:
- backend
backend:
build: ./backend
container_name: django-backend
command: python manage.py runserver 0.0.0.0:${BACKEND_PORT}
volumes:
- ./backend:/app
ports:
- "${BACKEND_PORT}:${BACKEND_PORT}"
environment:
- DB_HOST=${DB_HOST}
- DB_NAME=${DB_NAME}
- DB_USER=${DB_USER}
- DB_PASS=${DB_PASS}
- DB_PORT=${DB_PORT}
depends_on:
db:
condition: service_healthy
db:
image: postgres:15
container_name: postgres-db
restart: always
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASS}
POSTGRES_DB: ${DB_NAME}
healthcheck:
test: ["CMD", "pg_isready", "-q", "-d", "${DB_NAME}", "-U", "${DB_USER}"]
interval: 5s
timeout: 5s
retries: 5
ports:
- "${DB_PORT}:${DB_PORT}"
volumes:
- db_data:/var/lib/postgresql/data
# - ./db/init.sql:/docker-entrypoint-initdb.d/init.sql
ldap:
image: osixia/openldap:1.5.0
container_name: dev-ldap
environment:
- LDAP_ORGANISATION=dev
- LDAP_DOMAIN=example.com
- LDAP_ADMIN_PASSWORD=admin
ports:
- "389:389"
volumes:
db_data:
node_modules:
driver: local
driver_opts:
type: none
o: bind
device: ./frontend/node_modules