-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.live.yml
73 lines (68 loc) · 1.85 KB
/
docker-compose.live.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
version: '3.8'
services:
npb-app-live:
container_name: npb-app-live
image: nemanjamitic/nextjs-prisma-boilerplate:latest
#command: sleep infinity
volumes:
- ./uploads:/app/uploads
# alternative 1 - d-c.yml env vars
environment:
# public vars
- APP_ENV
- SITE_PROTOCOL
- SITE_HOSTNAME
- PORT
- NEXTAUTH_URL
# private vars
- DATABASE_URL
- SECRET
- FACEBOOK_CLIENT_ID
- FACEBOOK_CLIENT_SECRET
- GOOGLE_CLIENT_ID
- GOOGLE_CLIENT_SECRET
# alternative 2 - env files
# env_file:
# - .env.production.live
# - .env.production.live.local
labels:
- 'traefik.enable=true'
- 'traefik.docker.network=proxy'
- 'traefik.http.routers.npb-app-secure.rule=Host(`${SITE_HOSTNAME}`)'
- 'traefik.http.routers.npb-app-secure.entrypoints=websecure'
- 'traefik.http.routers.npb-app-secure.service=npb-app-svc'
- 'traefik.http.services.npb-app-svc.loadbalancer.server.port=3001'
depends_on:
- npb-db-live
networks:
- proxy
npb-db-live:
image: postgres:14.3-bullseye
container_name: npb-db-live
restart: unless-stopped
ports:
- '5432:5432'
user: '${MY_UID}:${MY_GID}'
volumes:
- ./prisma/pg-data:/var/lib/postgresql/data
# uncomment for external access
# - ./prisma/pg-config/pg_hba.conf:/etc/postgresql.conf
# - ./prisma/pg-config/postgresql.conf:/etc/pg_hba.conf
# alternative 1 - d-c.yml env vars
environment:
- PGDATA=/var/lib/postgresql/data/data-live
# private vars
- POSTGRES_HOSTNAME
- POSTGRES_PORT
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
# alternative 2 - env files
# env_file:
# - .env.production.live.local
networks:
# for adminer
- proxy
networks:
proxy:
external: true