Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
91 lines (88 loc) · 3.07 KB
/
Copy pathdocker-compose.yml
File metadata and controls
91 lines (88 loc) · 3.07 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
# A two-minute trial of Mainline on your own machine: it pulls the image the
# public repository publishes, seeds sample teams on its first start and
# prints a login link for each person. Every value here is a throwaway for a
# trial on this machine. To run Mainline for real, use
# docker-compose.selfhost.yml; to work on the code, docker-compose.dev.yml.
name: mainline-trial
x-app-env: &app-env
RACK_ENV: development
MAINLINE_DATABASE_URL: postgres://mainline:password@db:5432/mainline_development
MAINLINE_APP_DATABASE_URL: postgres://mainline_app:app_password@db:5432/mainline_development
MAINLINE_APP_USER_DATABASE_PASSWORD: app_password
MAINLINE_SESSION_SECRET: trial-only-session-secret-for-this-machine-never-for-real-use-000
LOCKBOX_MASTER_KEY: "0000000000000000000000000000000000000000000000000000000000000000"
SENTRY_DSN: disabled
SENTRY_ENVIRONMENT: trial
SMTP_HOST: trial_placeholder
SMTP_PORT: "465"
SMTP_USERNAME: trial_placeholder
SMTP_PASSWORD: trial_placeholder
SMTP_TLS: tls
MAIL_FROM: trial@localhost
GOOGLE_CLIENT_ID: disabled
GOOGLE_CLIENT_SECRET: disabled
GH_OAUTH_CLIENT_ID: disabled
GH_OAUTH_CLIENT_SECRET: disabled
GITLAB_CLIENT_ID: disabled
GITLAB_CLIENT_SECRET: disabled
CI_MONITOR_GITHUB_APP_ID: trial_placeholder
CI_MONITOR_GITHUB_APP_SLUG: trial_placeholder
CI_MONITOR_GITHUB_APP_CLIENT_ID: trial_placeholder
CI_MONITOR_GITHUB_APP_CLIENT_SECRET: trial_placeholder
CI_MONITOR_GITHUB_PRIVATE_KEY: trial_placeholder
CI_MONITOR_GITHUB_WEBHOOK_SECRET: trial_placeholder
BASE_URL: http://localhost:3000
SIGNUPS: open
MAINLINE_HOST: localhost:3000
REDIS_URL: redis://redis:6379/0
services:
db:
image: postgres:16
environment:
POSTGRES_USER: mainline
POSTGRES_PASSWORD: password
POSTGRES_DB: mainline_development
volumes:
- trial_postgres:/var/lib/postgresql/data
- ./initdb.sh:/docker-entrypoint-initdb.d/init-db.sh:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U mainline -d mainline_development"]
interval: 5s
timeout: 5s
retries: 10
redis:
image: redis:7-alpine
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 10
app:
image: ghcr.io/mainline-dev/mainline-core:latest
# Migrates, seeds the sample teams on the first start and prints the
# login links, then serves.
command: sh -c "bundle exec rake trial_up && bundle exec rackup -p 3000 -o 0.0.0.0"
ports:
- "127.0.0.1:3000:3000"
environment: *app-env
healthcheck:
test: ["CMD", "curl", "-fsS", "http://localhost:3000/up"]
interval: 5s
timeout: 5s
retries: 5
start_period: 300s
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
worker:
image: ghcr.io/mainline-dev/mainline-core:latest
command: bundle exec sidekiq -r ./sidekiq_boot.rb
environment: *app-env
# The app runs the migrations; a worker started before it finds no tables.
depends_on:
app:
condition: service_healthy
volumes:
trial_postgres: