-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
107 lines (102 loc) · 3.28 KB
/
Copy pathdocker-compose.yml
File metadata and controls
107 lines (102 loc) · 3.28 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
# Local containerized environment for the AdonisJS web kit.
# - `docker compose up postgres redis mailpit` -> local infrastructure, app on the host
# - `docker compose up --build` -> full stack in containers
#
# Generate a real APP_KEY once: `pnpm ace generate:key` (then export APP_KEY=...).
name: adonis-web-kit
services:
postgres:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: adonis_web_kit
ports:
- '5432:5432'
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres -d adonis_web_kit']
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
restart: unless-stopped
command: ['redis-server', '--requirepass', 'redis']
ports:
- '6379:6379'
volumes:
- redisdata:/data
healthcheck:
test: ['CMD', 'redis-cli', '-a', 'redis', 'ping']
interval: 10s
timeout: 5s
retries: 5
mailpit:
image: axllent/mailpit:v1.30.4
restart: unless-stopped
ports:
- '1025:1025'
- '8025:8025'
app:
build:
context: .
target: production
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
mailpit:
condition: service_started
ports:
- '3333:3333'
environment:
TZ: UTC
NODE_ENV: production
PORT: 3333
HOST: 0.0.0.0
LOG_LEVEL: info
APP_NAME: ${APP_NAME:-Adonis Web Kit}
APP_URL: ${APP_URL:-http://localhost:3333}
APP_SOURCE_URL: ${APP_SOURCE_URL:-https://github.com/gabrielmaialva33/adonis-web-kit}
# Development placeholders only. Override every secret outside disposable environments.
APP_KEY: ${APP_KEY:-dev_app_key_change_me_32_chars_min}
ACCESS_TOKEN_SECRET: ${ACCESS_TOKEN_SECRET:-dev_access_token_secret_change_me}
REFRESH_TOKEN_SECRET: ${REFRESH_TOKEN_SECRET:-dev_refresh_token_secret_change_me}
EMAIL_VERIFICATION_SECRET: ${EMAIL_VERIFICATION_SECRET:-dev_email_verification_secret_change_me}
PASSWORD_RESET_SECRET: ${PASSWORD_RESET_SECRET:-dev_password_reset_secret_change_me}
PASSWORD_RESET_TTL_MINUTES: ${PASSWORD_RESET_TTL_MINUTES:-60}
JWT_ISSUER: ${JWT_ISSUER:-adonis-web-kit}
JWT_AUDIENCE: ${JWT_AUDIENCE:-adonis-web-kit}
JWT_COOKIE_NAME: ${JWT_COOKIE_NAME:-token}
SESSION_COOKIE_NAME: ${SESSION_COOKIE_NAME:-adonis-web-kit-session}
REGISTRATION_WORKSPACE_MODE: ${REGISTRATION_WORKSPACE_MODE:-personal}
DEMO_PAGES_ENABLED: 'false'
SESSION_DRIVER: cookie
LIMITER_STORE: redis
DRIVE_DISK: fs
DB_CONNECTION: postgres
DB_HOST: postgres
DB_PORT: 5432
DB_USER: postgres
DB_PASSWORD: postgres
DB_DATABASE: adonis_web_kit
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_PASSWORD: redis
REDIS_DB: 0
QUEUE_REDIS_HOST: redis
QUEUE_REDIS_PORT: 6379
QUEUE_REDIS_PASSWORD: redis
MAIL_MAILER: smtp
MAIL_FROM_ADDRESS: ${MAIL_FROM_ADDRESS:-noreply@example.com}
MAIL_FROM_NAME: ${MAIL_FROM_NAME:-Adonis Web Kit}
SMTP_HOST: mailpit
SMTP_PORT: 1025
volumes:
pgdata:
redisdata: