Initial repo setup.
This commit is contained in:
parent
e397f6a540
commit
478cc4f4d7
|
@ -6,3 +6,12 @@ DOMAIN=voila.example.com
|
|||
#EXTRA_DOMAINS=', `www.voila.example.com`'
|
||||
|
||||
LETS_ENCRYPT_ENV=production
|
||||
|
||||
# The voila version to pin to (can be overriden by requirements.txt)
|
||||
VOILA_VERSION=0.4.0
|
||||
# The directory to run voila from.
|
||||
VOILA_DIRECTORY=/data
|
||||
# Additional options to pass to voila.
|
||||
VOILA_OPTIONS=''
|
||||
# The requirements.txt path
|
||||
REQUIREMENTS_PATH=/data/requirements.txt
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
* **Category**: Apps
|
||||
* **Status**: 0
|
||||
* **Image**: [`voila`](https://hub.docker.com/r/voila), 4, upstream
|
||||
* **Image**: [`python`](https://hub.docker.com/r/python), 4, upstream
|
||||
* **Healthcheck**: No
|
||||
* **Backups**: No
|
||||
* **Email**: No
|
||||
|
|
32
compose.yml
32
compose.yml
|
@ -3,9 +3,22 @@ version: "3.8"
|
|||
|
||||
services:
|
||||
app:
|
||||
image: nginx:1.20.0
|
||||
image: python:3.10
|
||||
environment:
|
||||
- VOILA_VERSION
|
||||
- VOILA_DIRECTORY
|
||||
- VOILA_OPTIONS
|
||||
- REQUIREMENTS_PATH
|
||||
volumes:
|
||||
- data:/data
|
||||
working_dir: /data
|
||||
configs:
|
||||
- source: startup_sh
|
||||
target: /startup.sh
|
||||
mode: 0755
|
||||
networks:
|
||||
- proxy
|
||||
command: /startup.sh
|
||||
deploy:
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
|
@ -20,13 +33,18 @@ services:
|
|||
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
|
||||
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
|
||||
- "coop-cloud.${STACK_NAME}.version="
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
start_period: 1m
|
||||
# healthcheck:
|
||||
# test: ["CMD", "curl", "-f", "http://localhost"]
|
||||
# interval: 30s
|
||||
# timeout: 10s
|
||||
# retries: 10
|
||||
# start_period: 1m
|
||||
|
||||
networks:
|
||||
proxy:
|
||||
external: true
|
||||
|
||||
configs:
|
||||
startup_sh:
|
||||
name: ${STACK_NAME}_startup_sh_{$STARTUP_SH_VERSION}
|
||||
file: startup.sh
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
cd $VOILA_DIRECTORY
|
||||
|
||||
if [-e "$REQUIREMENTS_PATH" ]; then
|
||||
pip install -r "$REQUIREMENTS_PATH"
|
||||
else
|
||||
pip install voila==$VOILA_VERSION
|
||||
fi
|
||||
|
||||
python -mvoila --no-browser --port=80 $VOILA_OPTIONS
|
Loading…
Reference in New Issue