-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.production.yml
59 lines (55 loc) · 2.08 KB
/
docker-compose.production.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
services:
db:
image: postgres:16-alpine
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: postgres
volumes:
- postgres-data:/var/lib/postgresql/data
traefik:
image: traefik:v2.9
command:
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.insecure.address=:80"
- "--entrypoints.web.address=:443"
- "--certificatesresolvers.le.acme.httpchallenge=true"
- "--certificatesresolvers.le.acme.httpchallenge.entrypoint=insecure"
- "--certificatesresolvers.le.acme.storage=/certs/acme.json"
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- traefik-certs:/certs
server:
image: 996247265255.dkr.ecr.us-east-1.amazonaws.com/snapcaster
env_file: .env
labels:
- "traefik.enable=true"
- "traefik.http.routers.server.entrypoints=web"
- "traefik.http.routers.server.rule=Host(`${APP_HOST}`) && PathPrefix(`/api`) && !PathPrefix(`/api/internal`)"
- "traefik.http.services.server.loadbalancer.server.port=3001"
- "traefik.http.middlewares.strip-api.stripprefix.prefixes=/api"
- "traefik.http.routers.server.middlewares=strip-api"
- "traefik.http.routers.server.tls=true"
- "traefik.http.routers.server.tls.certresolver=le"
client:
image: 996247265255.dkr.ecr.us-east-1.amazonaws.com/snapcaster
working_dir: /src/packages/client
command: ["../../node_modules/.bin/next", "start"]
environment:
NEYNAR_API_KEY: ${NEYNAR_API_KEY}
BASE_URL: ${BASE_URL}
labels:
- "traefik.enable=true"
- "traefik.http.routers.client.entrypoints=web"
- "traefik.http.routers.client.rule=Host(`${APP_HOST}`) && !PathPrefix(`/api`)"
- "traefik.http.services.client.loadbalancer.server.port=3000"
- "traefik.http.routers.client.tls=true"
- "traefik.http.routers.client.tls.certresolver=le"
volumes:
postgres-data:
traefik-certs: