update
This commit is contained in:
parent
6a933fdeeb
commit
2b537ae6bc
@ -17,7 +17,7 @@ DEFAULT_TIMEZONE="America/New_York"
|
|||||||
ENABLE_RSS_FEED=True
|
ENABLE_RSS_FEED=True
|
||||||
|
|
||||||
ENABLE_PROMETHEUS_METRICS=False
|
ENABLE_PROMETHEUS_METRICS=False
|
||||||
#GUNICORN_WORKERS= # defaults to 6
|
#GUNICORN_WORKERS= # Advanced option based on the specs of your server, defaults to 6
|
||||||
|
|
||||||
#ALERT_MAILS = ["your_email_address", "another_email_address"] # Optional. Recieve Internal Server 500 errors. Good for debugging.
|
#ALERT_MAILS = ["your_email_address", "another_email_address"] # Optional. Recieve Internal Server 500 errors. Good for debugging.
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<!-- metadata -->
|
<!-- metadata -->
|
||||||
|
|
||||||
* **Category**: Apps
|
* **Category**: Apps
|
||||||
* **Status**: 0
|
* **Status**: wip
|
||||||
* **Image**: [`liberaforms`](https://hub.docker.com/r/liberaforms), 4, upstream
|
* **Image**: [`liberaforms`](https://hub.docker.com/r/liberaforms), 4, upstream
|
||||||
* **Healthcheck**: Yes
|
* **Healthcheck**: Yes
|
||||||
* **Backups**: No
|
* **Backups**: No
|
||||||
@ -20,5 +20,6 @@
|
|||||||
* `abra app new liberaforms --secrets`
|
* `abra app new liberaforms --secrets`
|
||||||
* `abra app config <app-name>`
|
* `abra app config <app-name>`
|
||||||
* `abra app deploy <app-name>`
|
* `abra app deploy <app-name>`
|
||||||
|
* `abra app run <app-name> app /init.sh` [Create tables](https://gitlab.com/liberaforms/liberaforms/-/blob/main/docs/docker.md?ref_type=heads#create-the-database) in pgsql database
|
||||||
|
|
||||||
For more, see [`docs.coopcloud.tech`](https://docs.coopcloud.tech).
|
For more, see [`docs.coopcloud.tech`](https://docs.coopcloud.tech).
|
||||||
|
13
compose.yml
13
compose.yml
@ -2,6 +2,7 @@
|
|||||||
version: "3.8"
|
version: "3.8"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
app:
|
app:
|
||||||
image: fung.uy/mycosystems/liberaforms:v4.0.0
|
image: fung.uy/mycosystems/liberaforms:v4.0.0
|
||||||
configs:
|
configs:
|
||||||
@ -30,6 +31,7 @@ services:
|
|||||||
LOG_DIR: /app/logs
|
LOG_DIR: /app/logs
|
||||||
GUNICORN_WORKERS: ${GUNICORN_WORKERS:-6}
|
GUNICORN_WORKERS: ${GUNICORN_WORKERS:-6}
|
||||||
volumes:
|
volumes:
|
||||||
|
- app
|
||||||
- uploads:/app/uploads
|
- uploads:/app/uploads
|
||||||
- log:/app/logs
|
- log:/app/logs
|
||||||
secrets:
|
secrets:
|
||||||
@ -37,21 +39,18 @@ services:
|
|||||||
- secret_key
|
- secret_key
|
||||||
- crypto_key
|
- crypto_key
|
||||||
networks:
|
networks:
|
||||||
- proxy
|
|
||||||
- internal
|
- internal
|
||||||
deploy:
|
deploy:
|
||||||
restart_policy:
|
|
||||||
condition: on-failure
|
|
||||||
labels:
|
labels:
|
||||||
|
- "coop-cloud.${STACK_NAME}.version="
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=5000"
|
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=5000"
|
||||||
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
|
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
|
||||||
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
|
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
|
||||||
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
||||||
- "coop-cloud.${STACK_NAME}.version="
|
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: postgres:17-alpine
|
image: postgres:17
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "pg_isready", "-q", "-d", "postgres", "-U", "${POSTGRES_ROOT_USER}"]
|
test: ["CMD", "pg_isready", "-q", "-d", "postgres", "-U", "${POSTGRES_ROOT_USER}"]
|
||||||
timeout: 45s
|
timeout: 45s
|
||||||
@ -98,3 +97,7 @@ configs:
|
|||||||
name: ${STACK_NAME}_init_${INIT_VERSION}
|
name: ${STACK_NAME}_init_${INIT_VERSION}
|
||||||
file: init.sh.tmpl
|
file: init.sh.tmpl
|
||||||
template_driver: golang
|
template_driver: golang
|
||||||
|
nginx_conf:
|
||||||
|
name: ${STACK_NAME}_nginx_conf_${NGINX_CONF_VERSION}
|
||||||
|
file: nginx.conf.tmpl
|
||||||
|
template_driver: golang
|
||||||
|
34
init.sh.tmpl
Normal file
34
init.sh.tmpl
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
file_env() {
|
||||||
|
local var="$1"
|
||||||
|
local fileVar="${var}_FILE"
|
||||||
|
local def="${2:-}"
|
||||||
|
|
||||||
|
if [ "${!var:-}" ] && [ "${!fileVar:-}" ]; then
|
||||||
|
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
local val="$def"
|
||||||
|
|
||||||
|
if [ "${!var:-}" ]; then
|
||||||
|
val="${!var}"
|
||||||
|
elif [ "${!fileVar:-}" ]; then
|
||||||
|
val="$(< "${!fileVar}")"
|
||||||
|
fi
|
||||||
|
|
||||||
|
export "$var"="$val"
|
||||||
|
unset "$fileVar"
|
||||||
|
}
|
||||||
|
|
||||||
|
file_env "DB_PASSWORD"
|
||||||
|
file_env "CRYPTO_KEY"
|
||||||
|
file_env "SECRET_KEY"
|
||||||
|
file_env "LDAP_BIND_PASSWORD"
|
||||||
|
|
||||||
|
flask database create --docker-container db
|
||||||
|
|
||||||
|
flask database create-tables
|
Loading…
x
Reference in New Issue
Block a user