rstudio/compose.yml

57 lines
1.3 KiB
YAML
Raw Normal View History

2021-05-12 09:43:43 +00:00
---
version: "3.8"
services:
app:
2021-05-17 13:54:59 +00:00
image: rocker/tidyverse:4.0.4
2021-05-12 09:43:43 +00:00
networks:
- proxy
2021-05-17 13:54:59 +00:00
volumes:
- home:/home
secrets:
- admin_password
environment:
- ROOT=TRUE
- PASSWORD_FILE=/run/secrets/admin_password
configs:
- source: custom_entrypoint
target: /usr/local/bin/docker-entrypoint.sh
mode: 0555
entrypoint: /usr/local/bin/docker-entrypoint.sh
command: /init
2021-05-12 09:43:43 +00:00
deploy:
restart_policy:
condition: on-failure
labels:
- "traefik.enable=true"
2021-05-17 13:54:59 +00:00
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=8787"
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`)"
2021-05-12 09:43:43 +00:00
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
2021-05-17 13:54:59 +00:00
entrypoint:
2021-05-12 09:43:43 +00:00
healthcheck:
2021-05-17 13:54:59 +00:00
test:
["CMD-SHELL", "wget -q --spider --proxy=off localhost:8787 || exit 1"]
2021-05-12 09:43:43 +00:00
interval: 30s
timeout: 10s
retries: 10
start_period: 1m
2021-05-17 13:54:59 +00:00
volumes:
home:
2021-05-12 09:43:43 +00:00
networks:
proxy:
external: true
2021-05-17 13:54:59 +00:00
configs:
custom_entrypoint:
name: ${STACK_NAME}_custom_entrypoint_${CUSTOM_ENTRYPOINT_VERSION}
file: entrypoint.sh.tmpl
secrets:
admin_password:
name: ${STACK_NAME}_admin_password_${SECRET_ADMIN_PASSWORD_VERSION}
external: true