-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
56 lines (51 loc) · 1.65 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
version: "2.3"
services:
# Service for localhost development
local:
build:
context: .
image: ${DOCKER_IMAGE? Missing env var for DOCKER_IMAGE}
volumes:
- ./nginx/nginx-behind-traefik.conf:/etc/nginx/nginx.conf
- ./nginx/conf.d/local.conf:/etc/nginx/conf.d/default.conf
- ./shapes-app:/usr/share/nginx/html
ports:
- 8000:8000 # needs to match the port in nginx/conf.d/local.conf
networks:
- default
# Service to develop in an online server behind Traefik
dev:
build:
context: .
image: ${DOCKER_IMAGE? Missing env var for DOCKER_IMAGE}
volumes:
- ./nginx/nginx-behind-traefik.conf:/etc/nginx/nginx.conf
- ./nginx/conf.d/dev.conf:/etc/nginx/conf.d/default.conf
- ./shapes-app:/usr/share/nginx/html
networks:
- traefik
- default
labels:
- "traefik.enable=true"
- "traefik.backend=${PUBLIC_DOMAIN? Missing env var PUBLIC_DOMAIN}"
- "traefik.docker.network=traefik"
- "traefik.port=80" # needs to match the port in nginx/conf.d/dev.conf
- "traefik.frontend.rule=Host:${PUBLIC_DOMAIN}"
# Service to run the Quickstart as a production demo
prod:
build:
context: .
image: ${DOCKER_IMAGE? Missing env var for DOCKER_IMAGE}
restart: unless-stopped
networks:
- traefik
- default
labels:
- "traefik.enable=true"
- "traefik.backend=${PUBLIC_DOMAIN? Missing env var PUBLIC_DOMAIN}"
- "traefik.docker.network=traefik"
- "traefik.port=80" # needs to match the port in nginx/conf.d/prod.conf
- "traefik.frontend.rule=Host:${PUBLIC_DOMAIN}"
networks:
traefik:
external: true