-
Notifications
You must be signed in to change notification settings - Fork 11
/
docker-compose.local.yml
66 lines (62 loc) · 1.87 KB
/
docker-compose.local.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
version: "3.8"
services:
django:
build:
context: .
dockerfile: ./infrastructure/local/django/Dockerfile
image: codewof_local_django
volumes:
- ./codewof/:/app/:z
env_file:
- ./infrastructure/local/django/.envs
- ./infrastructure/local/postgres/.envs
command: /start
networks:
- uccser-development-stack
- backend
labels:
# General labels
- "traefik.enable=true"
- "traefik.docker.network=uccser-development-stack"
- "traefik.http.services.codewof-django.loadbalancer.server.port=8000"
# HTTPS
- "traefik.http.routers.codewof-django.entryPoints=web-secure"
- "traefik.http.routers.codewof-django.service=codewof-django"
- "traefik.http.routers.codewof-django.rule=Host(`codewof.localhost`)"
- "traefik.http.routers.codewof-django.tls=true"
# Node server for creating static files
node:
build:
context: .
dockerfile: ./infrastructure/local/node/Dockerfile
args:
DOCKER_UID: ${DOCKER_UID}
image: codewof_local_node
volumes:
# https://burnedikt.com/dockerized-node-development-and-mounting-node-volumes/#exclude-node_modules-from-the-mount
- ./codewof/package.json:/app/package.json:z
- ./codewof/gulpfile.js:/app/gulpfile.js:z
- ./codewof/static:/app/static:z
- ./codewof/build:/app/build:z
command: npm run dev
ports:
- "3000:3000"
# Expose browsersync UI: https://www.browsersync.io/docs/options/#option-ui
- "3001:3001"
postgres:
image: postgres:13.3
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
start_period: 10s
interval: 10s
timeout: 5s
retries: 3
env_file:
- ./infrastructure/local/postgres/.envs
networks:
- backend
networks:
backend:
driver: bridge
uccser-development-stack:
external: true