-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.prod.yml
52 lines (50 loc) · 1.43 KB
/
docker-compose.prod.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.8"
services:
echat-web:
container_name: echat-web
build:
context: web/
dockerfile: Dockerfile
target: prod
restart: always
networks:
- proxy
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.echat-web.rule=Host(`echat.coding.global`)'
- 'traefik.http.routers.echat-web.entrypoints=websecure'
- 'traefik.http.routers.echat-web.tls.certresolver=letsencrypt'
- 'traefik.http.services.echat-web.loadbalancer.server.port=3000'
echat-server:
container_name: echat-server
build:
context: server/
dockerfile: Dockerfile
target: prod
restart: always
depends_on:
- echat-db
environment:
- DATABASE_URL=postgres://postgres:9oQX2RUHuHzwjy@echat-db:5432/echat
networks:
- proxy
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.echat-server.rule=Host(`echat.coding.global`) && PathPrefix(`/graphql`)'
- 'traefik.http.routers.echat-server.entrypoints=websecure'
- 'traefik.http.routers.echat-server.tls.certresolver=letsencrypt'
- 'traefik.http.services.echat-server.loadbalancer.server.port=4001'
echat-db:
container_name: echat-db
image: postgres:14
restart: always
environment:
- POSTGRES_PASSWORD=9oQX2RUHuHzwjy
- POSTGRES_USER=postgres
- POSTGRES_DB=echat
networks:
- proxy
networks:
proxy:
external: false
name: proxy