-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.prod.yml
58 lines (55 loc) · 1.54 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
53
54
55
56
57
58
services:
app:
image: ghcr.io/maximedan/patrigma:latest
depends_on:
patrigma_db:
condition: service_healthy
environment:
- DATABASE_URL=${DATABASE_URL}
- NODE_ENV=${NODE_ENV}
- DATABASE_PASSWORD=${DATABASE_PASSWORD}
- NEXTAUTH_SECRET=${NEXTAUTH_SECRET}
- BASE_URL=${BASE_URL}
- NEXT_PUBLIC_BASE_URL=${BASE_URL}
- NEXTAUTH_URL=${NEXTAUTH_URL}
- NEXTAUTH_URL_INTERNAL=${NEXTAUTH_URL_INTERNAL}
ports:
- "3000:3000"
labels:
- "com.centurylinklabs.watchtower.enable=true"
- "traefik.enable=true"
- "traefik.http.routers.next-prod.rule=Host(`patrigma.code-with-alex.com`)"
- "traefik.http.routers.next-prod.entrypoints=websecure"
- "traefik.http.routers.next-prod.tls.certresolver=myresolver"
- "traefik.http.services.next-prod.loadbalancer.server.port=3000"
- "traefik.docker.network=internet"
networks:
- internet
volumes:
- "./src:/patrigma/src"
patrigma_db:
image: postgres:latest
container_name: patrigma_db
ports:
- "5433:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_DB: patrigma_db
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -U postgres -d patrigma_db -h localhost -p 5432",
]
interval: 10s
timeout: 5s
retries: 5
networks:
internet:
external: true
name: custom_frontend
volumes:
postgres_data: