-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
51 lines (48 loc) · 1.21 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
version: '3'
services:
traefik:
image: "traefik:v2.4"
container_name: "traefik"
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--entrypoints.http.address=:80"
- "--global.sendAnonymousUsage=false"
ports:
- "80:80"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
db:
depends_on:
- traefik
container_name: "${DB_URL}"
image: postgres:alpine
volumes:
- "./.pg-data:/var/lib/postgresql/data:rw"
ports:
- "5432:5432"
environment:
POSTGRES_USER: "${DB_USER}"
POSTGRES_PASSWORD: "${DB_PASSWORD}"
POSTGRES_DB: "${DB_DATABASE}"
labels:
traefik.enable: true
traefik.http.routers.pg.rule: Host(`${DB_URL}`)
traefik.http.routers.pg.entrypoints: http
app:
build:
context: ./
command: sh -c "yarn install && yarn dev"
container_name: "${APP_URL}"
volumes:
- "./:/usr/app"
ports:
- "${HTTP_PORT}"
environment:
PORT: "${HTTP_PORT}"
APP_URL: "http://${APP_URL}"
labels:
traefik.enable: true
traefik.http.routers.app.rule: Host(`${APP_URL}`)
traefik.http.routers.app.entrypoints: http