-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.prod.yml
61 lines (57 loc) · 1.64 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
59
60
61
services:
# Main NextJS frontend app
nextjs:
build:
target: prod
args:
NEXT_PUBLIC_API_URL: $NEXT_PUBLIC_API_URL
NEXT_PUBLIC_GOOGLE_RECAPTCHA_SITEKEY: $NEXT_PUBLIC_GOOGLE_RECAPTCHA_SITEKEY
environment:
# Server
PORT: $NEXT_PORT
NEXT_INTERNAL_API_URL: $NEXT_INTERNAL_API_URL
# Next Auth
NEXTAUTH_SECRET: $NEXTAUTH_SECRET
NEXTAUTH_URL: $NEXTAUTH_URL
# Google Identity Provider
GOOGLE_CLIENT_ID: $GOOGLE_CLIENT_ID
GOOGLE_CLIENT_SECRET: $GOOGLE_CLIENT_SECRET
ports:
- "$NEXT_PORT:$NEXT_PORT"
# Main Phoenix backend app
phoenix:
build:
target: prod
args:
POSTGREX_TIMEOUT: $POSTGREX_TIMEOUT
environment:
# Phoenix configuration
PHX_HOST: $PHX_HOST
PHX_PORT: $PHX_PORT
PHX_CONSUMER_URL: $PHX_CONSUMER_URL
PHX_SECRET_KEY_BASE: $PHX_SECRET_KEY_BASE
# Ecto configuration
DATABASE_URL: ecto://$PGUSER:$PGPASSWORD@db:$PGPORT/$PGDATABASE
# Google Identity Provider
GOOGLE_OPENID_CONFIG_URL: $GOOGLE_OPENID_CONFIG_URL
GOOGLE_OAUTH2_CERTS_URL: $GOOGLE_OAUTH2_CERTS_URL
ports:
- "$PHX_PORT:$PHX_PORT"
# Backend database
db:
environment:
# Set Postgres environment
PGUSER: $PGUSER
PGPASSWORD: $PGPASSWORD
PGDATABASE: $PGDATABASE
PGPORT: $PGPORT
# Set user/password for Postgres.
POSTGRES_USER: $PGUSER
POSTGRES_PASSWORD: $PGPASSWORD
# Set a path where Postgres should store the data.
PGDATA: /var/lib/postgresql/data/pgdata
volumes:
- pgdata:/var/lib/postgresql/data
restart: always
volumes:
pgdata: