generated from tobyscott25/next-auth-drizzle-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
99 lines (85 loc) · 2.75 KB
/
docker-compose.yaml
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
services:
# --WEBSITE PROD CONTAINER--
website:
profiles: [ production ]
# ports:
# - 3000:3000
build:
context: .
dockerfile: ./Dockerfile
restart: unless-stopped
volumes:
- .:/website
environment:
- NEXT_PUBLIC_HOST_NAME=${NEXT_PUBLIC_HOST_NAME}
# Stripe
- STRIPE_SECRET_KEY=${STRIPE_SECRET_KEY}
- NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=${NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY}
- STRIPE_WEBHOOK_SECRET=${STRIPE_WEBHOOK_SECRET}
# Price IDs (Stripe)
- PRICEID_1SITE=${PRICEID_1SITE}
- PRICEID_5SITE=${PRICEID_5SITE}
- PRICEID_10SITE=${PRICEID_10SITE}
# Database
- POSTGRES_HOST=postgres
- POSTGRES_PORT=${POSTGRES_PORT_INTERNAL:-5432}
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
# Emails
- EMAIL_FROM=${EMAIL_FROM}
- SMTP_HOST=${SMTP_HOST}
- SMTP_PORT=${SMTP_PORT}
- SMTP_USER=${SMTP_USER}
- SMTP_PASSWORD=${SMTP_PASSWORD}
# Github SSO
- GITHUB_CLIENT_ID=${GITHUB_CLIENT_ID}
- GITHUB_CLIENT_SECRET=${GITHUB_CLIENT_SECRET}
- GITHUB_CALLBACK_URL=${GITHUB_CALLBACK_URL}
# BunnyCDN (Image uploads)
- NEXT_PUBLIC_BUNNYCDN_STORAGE_ZONE=${NEXT_PUBLIC_BUNNYCDN_STORAGE_ZONE}
- BUNNYCDN_ZONE_API_KEY=${BUNNYCDN_ZONE_API_KEY}
- BUNNYCDN_ACCOUNT_API_KEY=${BUNNYCDN_ACCOUNT_API_KEY}
# Stripe
- NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=${NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY}
- STRIPE_SECRET_KEY=${STRIPE_SECRET_KEY}
- STRIPE_WEBHOOK_SECRET=${STRIPE_WEBHOOK_SECRET}
depends_on:
postgres:
condition: service_healthy
# Postgres database
postgres:
profiles: [ production, dev ]
image: postgres:16.4-alpine
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
PGDATA: /var/lib/postgresql/data
PGPORT: ${POSTGRES_PORT_INTERNAL:-5432}
ports:
- "${POSTGRES_PORT_EXTERNAL:-64431}:${POSTGRES_PORT_INTERNAL:-5432}"
volumes:
- postgres:/var/lib/postgresql/data
expose: [5432]
healthcheck:
test: ["CMD-SHELL", "pg_isready -d postgres -U $${POSTGRES_USER:-postgres}"]
interval: 10s
timeout: 5s
retries: 5
dbgate:
profiles: [dev ]
image: dbgate/dbgate:alpine
restart: always
ports:
- 3100:3000
environment:
CONNECTIONS: postgres
ENGINE_postgres: postgres@dbgate-plugin-postgres
LABEL_postgres: postgres
SERVER_postgres: postgres
PORT_postgres: 5432
USER_postgres: ${POSTGRES_USER:-postgres}
PASSWORD_postgres: ${POSTGRES_PASSWORD}
DATABASE_postgres: ${POSTGRES_DATABASE:-postgres}
volumes:
postgres: