Newer
Older
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
version: "3.8"
services:
proxy:
image: geometalab/env-configurable-caddy:latest
networks:
- web
- default
environment:
CADDY_CONFIG: |
:8080 {
route {
handle /api/* {
uri strip_prefix /api
reverse_proxy backend:3010
}
redir /api /api/
reverse_proxy /* {
to frontend:80
}
}
}
deploy:
labels:
caddy: osm-logger.sifs0003.infs.ch
caddy.reverse_proxy: "{{upstreams 8080}}"
restart_policy:
condition: "on-failure"
frontend:
image: $CONTAINER_REGISTRY_PATH/frontend:latest
networks:
- default
deploy:
restart_policy:
condition: "on-failure"
backend:
image: traefik/whoami
command:
# It tells whoami to start listening on 2001 instead of 80
- --port=2001
- --name=iamfoo
# backend:
# image: $CONTAINER_REGISTRY_PATH/backend:latest
# networks:
# - default
# volumes:
# - logs:/logs-path
# deploy:
# restart_policy:
# condition: "on-failure"
volumes:
logs: null
networks:
web:
external: true
name: web