-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy pathdocker-compose.prebuilt.base.yaml
More file actions
138 lines (123 loc) · 3.63 KB
/
Copy pathdocker-compose.prebuilt.base.yaml
File metadata and controls
138 lines (123 loc) · 3.63 KB
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
version: '3.8'
x-environment: &shared-environment
# ---- APP -------
VERSION: ${VERSION}
APP_NAME: ${APP_NAME}
APP_ENV: ${APP_ENV:-production}
NODE_ENV: ${NODE_ENV:-${APP_ENV:-production}}
HOST: ${HOST}
VERIFY_EMAIL_ENABLED: ${VERIFY_EMAIL_ENABLED:-false}
# ---- REDIS ----
REDIS_HOST: ${REDIS_HOST:-redis}
REDIS_PORT: ${REDIS_PORT:-6379}
# ---- DATABASE ----
DB_TYPE: ${DB_TYPE}
DB_HOST: ${DB_HOST:-postgres}
DB_PORT: ${DB_PORT:-5432}
DB_NAME_SERVER: server
DB_USER_SERVER: app_user
POSTGRES_USER: postgres
# ---- LOGGING ----
LOG_LEVEL: ${LOG_LEVEL:-INFO}
LOG_IS_FORMAT_JSON: ${LOG_IS_FORMAT_JSON:-false}
LOG_IS_FULL_DETAILS: ${LOG_IS_FULL_DETAILS:-false}
LOG_ENABLED_FILE_LOGGING: ${LOG_ENABLED_FILE_LOGGING}
LOG_DIR_PATH: ${LOG_DIR_PATH}
LOG_ENABLED_EXTERNAL_LOGGING: ${LOG_ENABLED_EXTERNAL_LOGGING}
LOG_EXTERNAL_HTTP_HOST: ${LOG_EXTERNAL_HTTP_HOST}
LOG_EXTERNAL_HTTP_PORT: ${LOG_EXTERNAL_HTTP_PORT}
LOG_EXTERNAL_HTTP_PATH: ${LOG_EXTERNAL_HTTP_PATH}
LOG_EXTERNAL_HTTP_LEVEL: ${LOG_EXTERNAL_HTTP_LEVEL}
LOG_EXTERNAL_HTTP_TOKEN: ${LOG_EXTERNAL_HTTP_TOKEN}
# ---- HOCUSPOCUS ----
HOCUSPOCUS_PORT: ${HOCUSPOCUS_PORT}
HOCUSPOCUS_URL: ${HOCUSPOCUS_URL}
# ---- EMAIL ----
EMAIL_ENABLE: ${EMAIL_ENABLE:-false}
EMAIL_FROM: ${EMAIL_FROM:-noreply@example.com}
EMAIL_HOST: ${EMAIL_HOST}
EMAIL_PORT: ${EMAIL_PORT:-587}
EMAIL_USERNAME: ${EMAIL_USERNAME:-noreply@example.com}
# ---- CRYPTO ----
CRYPTO_SALT_BYTES: ${SALT_BYTES}
CRYPTO_ITERATION: ${ITERATION}
CRYPTO_KEY_LENGTH: ${KEY_LENGTH}
CRYPTO_ALGORITHM: ${ALGORITHM}
# ---- TOKEN ----
TOKEN_EXPIRES: ${TOKEN_EXPIRES}
# ---- AUTH ----
NEXTAUTH_URL: ${NEXTAUTH_URL:-http://localhost:3000}
NEXTAUTH_SESSION_EXPIRES: ${NEXTAUTH_SESSION_EXPIRES:-86400}
# ---- DEPLOY INFO ----
PROJECT_NAME: ${PROJECT_NAME}
EXPOSE_DB_PORT: ${EXPOSE_DB_PORT:-5432}
EXPOSE_HOCUSPOCUS_PORT: ${EXPOSE_HOCUSPOCUS_PORT:-1234}
EXPOSE_REDIS_PORT: ${EXPOSE_REDIS_PORT:-6379}
EXPOSE_SERVER_PORT: ${EXPOSE_SERVER_PORT:-3000}
secrets:
db_password_server:
file: ./secrets/db_password_server
db_password_hocuspocus:
file: ./secrets/db_password_hocuspocus
postgres_password:
file: ./secrets/postgres_password
redis_password:
file: ./secrets/redis_password
email_password:
file: ./secrets/email_password
crypto_key:
file: ./secrets/crypto_key
token_secret_key:
file: ./secrets/token_secret_key
nextauth_secret:
file: ./secrets/nextauth_secret
credential_encryption_key:
file: ./secrets/credential_encryption_key
google_oauth_client_id:
file: ./secrets/google_oauth_client_id
google_oauth_client_secret:
file: ./secrets/google_oauth_client_secret
alga_auth_key:
file: ./secrets/alga_auth_key
services:
postgres:
image: ankane/pgvector:latest
environment:
<<: *shared-environment
POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password
POSTGRES_HOST_AUTH_METHOD: md5
secrets:
- postgres_password
ports:
- "${EXPOSE_DB_PORT:-5432}:5432"
networks:
- app-network
redis:
build:
context: .
dockerfile: redis/Dockerfile
environment:
<<: *shared-environment
ports:
- '${EXPOSE_REDIS_PORT:-6379}:6379'
secrets:
- redis_password
networks:
- app-network
pgbouncer:
extends:
file: ./pgbouncer/docker-compose.yaml
service: pgbouncer
environment:
<<: *shared-environment
secrets:
- postgres_password
- db_password_server
networks:
- app-network
depends_on:
postgres:
condition: service_started
networks:
app-network:
driver: bridge