forked from learning-unlimited/ESP-Website
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
67 lines (63 loc) · 1.65 KB
/
Copy pathdocker-compose.yml
File metadata and controls
67 lines (63 loc) · 1.65 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
services:
db:
image: postgres:14-alpine
environment:
POSTGRES_DB: devsite_django
POSTGRES_USER: esp
POSTGRES_PASSWORD: password
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U esp -d devsite_django"]
interval: 5s
timeout: 3s
retries: 5
restart: unless-stopped
networks:
- esp_network
memcached:
image: memcached:alpine
ports:
- "11211:11211"
restart: unless-stopped
networks:
- esp_network
web:
build:
context: .
dockerfile: Dockerfile
target: runtime
volumes:
# Mount source code for live reloading (dev only)
- .:/app:cached
# Named volume keeps image-baked node_modules visible even under the
# source mount — prevents FileNotFoundError on fresh clones/builds.
- theme_node_modules:/app/esp/public/media/theme_editor/node_modules
ports:
- "8000:8000"
depends_on:
db:
condition: service_healthy
memcached:
condition: service_started
environment:
VIRTUAL_ENV: /usr
restart: unless-stopped
stdin_open: true
tty: true
networks:
- esp_network
volumes:
postgres_data:
driver: local
# theme_node_modules persists the image-baked Bootstrap/Bootswatch node_modules
# across source-code mounts. Named volumes are NOT updated by `docker compose build`
# alone — if package.json changes, run:
# docker volume rm <project>_theme_node_modules && docker compose up --build
theme_node_modules:
driver: local
networks:
esp_network:
driver: bridge