-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
83 lines (78 loc) · 1.98 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
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
name: wepieces_v1_0_0
services:
reverse-proxy:
image: traefik:v3.1
ports:
- 80:80
- 443:443
- 8080:8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command:
- --api.insecure=true
- --providers.docker=true
- --providers.docker.exposedbydefault=false
# - --entrypoints.websecure.address=:443
# - --certificatesresolvers.myresolver.acme.tlschallenge=true
# - --certificatesresolvers.myresolver.acme.email=${SUPERADMIN_EMAIL}
# - --certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json
# - --entrypoints.
env_file: .env
environment:
SUPERADMIN_EMAIL: ${SUPERADMIN_EMAIL}
app:
build: .
env_file: .env
environment:
DATABASE_HOST: database
NODE_ENV: production
expose:
- 5000
deploy:
mode: replicated
replicas: ${REPLICAS}
labels:
- "traefik.enable=true"
- "traefik.http.routers.app.rule=Host(`${DOMAIN}`)"
- "traefik.http.services.app.loadbalancer.server.port=5000"
# - "traefik.http.routers.app.entrypoints=websecure"
# - "traefik.http.routers.app.tls.certresolver=myresolver"
restart: always
depends_on:
- database
database:
image: postgres
env_file: .env
environment:
POSTGRES_USER: ${DATABASE_USER}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_DB: ${DATABASE_SCHEMA}
restart: always
user: postgres
volumes:
- database:/var/lib/postgresql/data
ports:
- "5432:5432"
expose:
- 5432
healthcheck:
test: ["CMD", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
pgadmin:
image: dpage/pgadmin4
env_file: .env
environment:
PGADMIN_DEFAULT_EMAIL: ${SUPERADMIN_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${SUPERADMIN_PASSWORD}
restart: always
ports:
- "5050:80"
depends_on:
- database
volumes:
- pgadmin:/var/lib/pgadmin
volumes:
database:
pgadmin: