-
Notifications
You must be signed in to change notification settings - Fork 27
/
compose.yaml
55 lines (54 loc) · 1.55 KB
/
compose.yaml
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
services:
app:
build:
context: .
target: deps
environment:
- NODE_ENV # pass NODE_ENV environment variable straight to Docker
depends_on:
- postgres
- redis
volumes:
- .:/home/node
- /home/node/node_modules/
- /etc/localtime:/etc/localtime:ro
networks:
- public
labels:
- traefik.enable=true
# Route /app -> :4000
- traefik.http.routers.frontend.tls=true
- traefik.http.routers.frontend.entrypoints=web-secure
- traefik.http.routers.frontend.rule=(Host(`localhost`) && PathPrefix(`/app`))
- traefik.http.routers.frontend.priority=2
- traefik.http.routers.frontend.service=frontend
- traefik.http.services.frontend.loadbalancer.server.port=4000
# Route / -> :3000
- traefik.http.routers.backend.tls=true
- traefik.http.routers.backend.entrypoints=web-secure
- traefik.http.routers.backend.rule=Host(`localhost`)
- traefik.http.routers.backend.priority=1
- traefik.http.routers.backend.service=backend
- traefik.http.services.backend.loadbalancer.server.port=3000
postgres:
image: postgres:14-alpine
ports:
- 5432:5432
environment:
# keep this in sync w/ DATABASE_URL in your environment file/variable
POSTGRES_DB: blink
POSTGRES_USER: knex
POSTGRES_HOST_AUTH_METHOD: trust
tmpfs:
- /var/lib/postgresql/data
networks:
- public
redis:
image: redis:7-alpine
ports:
- 6379:6379
networks:
- public
networks:
public:
external: true