-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose-local.yml
85 lines (79 loc) · 2.59 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
version: "3.8"
services:
db:
ports:
- 5432:5432
env_file:
- ./core_api/.env
traefik:
command:
# - "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
ports:
# The HTTP port
- "80:80"
# The Web UI (enabled by --api.insecure=true)
- "8081:8080"
# Traefik has to be in all networks in order to resolve propery the containers it is trying to contact
cache:
image: redis:latest
restart: always
networks:
- database
ports:
- 6379:6379
volumes:
- ./cache:/data
core_api:
build:
target: dev
env_file:
- ./core_api/.env
volumes:
- ./core_api/.env:/app/core_api/.env
- ./core_api/locales:/app/core_api/locales
- ./core_api/src:/app/core_api/src
- ./core_api/test:/app/core_api/test
- ./core_api/prisma:/app/core_api/prisma
- ./packages/core:/app/packages/core
- ./core_api/uploads:/app/core_api/uploads
real_time_api:
restart: always
# TODO: Should move to one dockerfile with target
build:
context: .
dockerfile: ./real_time_api/Dockerfile.real_time_api
args:
NPM_TOKEN: ${NPM_TOKEN}
networks:
- main
- database
depends_on:
- db
- cache
labels:
- traefik.enable=true
- traefik.docker.network=composite_main
- traefik.http.services.real_time_api.loadbalancer.server.port=3001
- traefik.http.middlewares.real_time_api_middleware.headers.accessControlAllowCredentials=true
- traefik.http.middlewares.real_time_api_middleware.headers.accessControlAllowHeaders=Content-Type,Authorization,baggage,sentry-trace
- traefik.http.middlewares.real_time_api_middleware.headers.accessControlAllowMethods=GET,POST,DELETE,PATCH
- traefik.http.routers.real_time_api.rule=Host(`real-time-api.composite`)
- traefik.http.middlewares.real_time_api_middleware.headers.accesscontrolalloworiginlist=http://front.composite
- traefik.http.routers.real_time_api.middlewares=real_time_api_middleware
volumes:
- ./real_time_api/.env:/app/real_time_api/.env
- ./real_time_api/assets.json:/app/real_time_api/assets.json
- ./real_time_api/src:/app/real_time_api/src
- ./real_time_api/test:/app/real_time_api/test
- ./packages/core:/app/packages/core
- ./packages/core-api-client:/app/packages/core-api-client
front:
build:
target: dev
volumes:
- ./front/.env:/app/front/.env
- ./front:/app/front
- ./packages:/app/packages