-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
143 lines (137 loc) · 3.56 KB
/
docker-compose.yml
File metadata and controls
143 lines (137 loc) · 3.56 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
139
140
141
142
143
services:
postgres:
image: postgres:16-alpine
init: true
environment:
POSTGRES_DB: ${POSTGRES_DB:-shiny_auth}
POSTGRES_USER: ${POSTGRES_USER:-shiny_user}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in .env}
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test:
- CMD-SHELL
- pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB"
interval: 10s
timeout: 5s
retries: 8
start_period: 15s
stop_grace_period: 20s
restart: unless-stopped
auth-admin:
build:
context: .
dockerfile: docker/auth-admin/Dockerfile
init: true
environment:
DB_HOST: postgres
DB_PORT: 5432
DB_NAME: ${POSTGRES_DB:-shiny_auth}
DB_USER: ${POSTGRES_USER:-shiny_user}
DB_PASSWORD: ${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in .env}
APP_ADMIN_USERNAME: ${APP_ADMIN_USERNAME:?Set APP_ADMIN_USERNAME in .env}
APP_ADMIN_PASSWORD: ${APP_ADMIN_PASSWORD:?Set APP_ADMIN_PASSWORD in .env}
APP_SESSION_COOKIE_NAME: ${APP_SESSION_COOKIE_NAME:-shiny_session}
APP_SESSION_TTL_HOURS: ${APP_SESSION_TTL_HOURS:-12}
APP_COOKIE_SECURE: ${APP_COOKIE_SECURE:-false}
APP_MIN_PASSWORD_LENGTH: ${APP_MIN_PASSWORD_LENGTH:-12}
depends_on:
postgres:
condition: service_healthy
healthcheck:
test:
- CMD
- python
- -c
- "import socket; s = socket.socket(); s.settimeout(2); s.connect(('127.0.0.1', 8080)); s.close()"
interval: 10s
timeout: 5s
retries: 8
start_period: 20s
stop_grace_period: 20s
restart: unless-stopped
r-shiny:
build:
context: .
dockerfile: docker/r-shiny/Dockerfile
init: true
healthcheck:
test:
- CMD
- R
- -q
- -e
- "con <- socketConnection('127.0.0.1', port=3838, open='r+', blocking=TRUE, timeout=2); close(con)"
interval: 15s
timeout: 5s
retries: 8
start_period: 30s
stop_grace_period: 20s
restart: unless-stopped
python-shiny:
build:
context: .
dockerfile: docker/python-shiny/Dockerfile
init: true
healthcheck:
test:
- CMD
- python
- -c
- "import socket; s = socket.socket(); s.settimeout(2); s.connect(('127.0.0.1', 3839)); s.close()"
interval: 15s
timeout: 5s
retries: 8
start_period: 20s
stop_grace_period: 20s
restart: unless-stopped
gateway:
image: nginx:1.27-alpine
depends_on:
r-shiny:
condition: service_healthy
python-shiny:
condition: service_healthy
auth-admin:
condition: service_healthy
init: true
ports:
- "8000:8000"
volumes:
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
stop_grace_period: 10s
restart: unless-stopped
docs-preview:
platform: "linux/amd64"
build:
context: .
dockerfile: docker/docs-preview/Dockerfile
profiles:
- docs
init: true
working_dir: /srv/jekyll
command:
- jekyll
- serve
- --source
- /srv/jekyll/docs
- --destination
- /tmp/.jekyll-site
- --host
- 0.0.0.0
- --port
- "4000"
- --livereload
- --force_polling
environment:
JEKYLL_ENV: development
JEKYLL_CACHE_DIR: /tmp/.jekyll-cache
PAGES_REPO_NWO: ${PAGES_REPO_NWO:-local/shiny-web-container}
volumes:
- ./docs:/srv/jekyll/docs
ports:
- "4000:4000"
- "35729:35729"
restart: unless-stopped
volumes:
postgres-data: