-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
52 lines (47 loc) · 1.2 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
version: '3.7'
services:
reverseproxy: # see https://docs.traefik.io/#the-traefik-quickstart-using-docker
image: traefik
command: --docker --api
ports:
- "80:80"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
server:
image: tdr-diff-backend
build:
context: ./services/server
dockerfile: Dockerfile
ports:
# if i put "1234:8000" I can access the server at localhost:1234 from the browser, and the backend/client both get it from 8000
- "8000:8000"
environment:
FRONTEND_ORIGIN: http://client:3000/
secrets:
- GITLAB_TOKEN
- TRIGGER_TOKEN
labels:
traefik.frontend.rule: PathPrefixStrip:/api
traefik.port: 8000
client:
image: tdr-diff-client
build:
context: ./services/client
dockerfile: Dockerfile
ports:
- "3000:3000"
environment:
NUXT_HOST: 0.0.0.0
BACKEND_URL: http://server:8000/
API_URL_BROWSER: /api
depends_on:
- server
labels:
traefik.frontend.rule: PathPrefixStrip:/
traefik.port: 3000
secrets:
GITLAB_TOKEN:
file: ./secrets/GITLAB_TOKEN
TRIGGER_TOKEN:
file: ./secrets/TRIGGER_TOKEN