generated from coop-cloud/example
Compare commits
6 Commits
0.4.1+2.5.
...
main
Author | SHA1 | Date |
---|---|---|
3wc | 88c34e9487 | |
3wc | 1156bb6fca | |
3wc | d9f3455b62 | |
3wc | a0f45fd486 | |
3wc | ff5c894c1c | |
3wc | 651eedff71 |
|
@ -3,7 +3,7 @@ kind: pipeline
|
||||||
name: deploy to swarm-test.autonomic.zone
|
name: deploy to swarm-test.autonomic.zone
|
||||||
steps:
|
steps:
|
||||||
- name: deployment
|
- name: deployment
|
||||||
image: decentral1se/stack-ssh-deploy:latest
|
image: git.coopcloud.tech/coop-cloud/stack-ssh-deploy:latest
|
||||||
settings:
|
settings:
|
||||||
host: swarm-test.autonomic.zone
|
host: swarm-test.autonomic.zone
|
||||||
stack: wallabag
|
stack: wallabag
|
||||||
|
|
11
compose.yml
11
compose.yml
|
@ -1,7 +1,7 @@
|
||||||
version: "3.8"
|
version: "3.8"
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: wallabag/wallabag:2.5.2
|
image: wallabag/wallabag:2.6.8
|
||||||
environment:
|
environment:
|
||||||
# Prevent database creation (handled by MySQL service)
|
# Prevent database creation (handled by MySQL service)
|
||||||
- POPULATE_DATABASE="false"
|
- POPULATE_DATABASE="false"
|
||||||
|
@ -16,7 +16,7 @@ services:
|
||||||
- SYMFONY__ENV__DATABASE_CHARSET=utf8mb4
|
- SYMFONY__ENV__DATABASE_CHARSET=utf8mb4
|
||||||
- SYMFONY__ENV__MAILER_HOST
|
- SYMFONY__ENV__MAILER_HOST
|
||||||
- SYMFONY__ENV__MAILER_USER
|
- SYMFONY__ENV__MAILER_USER
|
||||||
- SYMFONY__ENV__MAILER_PASSWORD=/run/secrets/smtp_password
|
- SYMFONY__ENV__MAILER_PASSWORD_FILE=/run/secrets/smtp_password
|
||||||
- SYMFONY__ENV__FROM_EMAIL
|
- SYMFONY__ENV__FROM_EMAIL
|
||||||
- SYMFONY__ENV__DOMAIN_NAME=https://${DOMAIN}
|
- SYMFONY__ENV__DOMAIN_NAME=https://${DOMAIN}
|
||||||
- SYMFONY__ENV__FOSUSER_REGISTRATION
|
- SYMFONY__ENV__FOSUSER_REGISTRATION
|
||||||
|
@ -28,7 +28,6 @@ services:
|
||||||
- internal
|
- internal
|
||||||
secrets:
|
secrets:
|
||||||
- db_password
|
- db_password
|
||||||
#- admin_password
|
|
||||||
- app_secret
|
- app_secret
|
||||||
- smtp_password
|
- smtp_password
|
||||||
entrypoint: /custom-entrypoint.sh
|
entrypoint: /custom-entrypoint.sh
|
||||||
|
@ -49,9 +48,9 @@ services:
|
||||||
#- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
|
#- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
|
||||||
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
|
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
|
||||||
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
|
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
|
||||||
- "coop-cloud.${STACK_NAME}.version=0.4.1+2.5.2"
|
- "coop-cloud.${STACK_NAME}.version=0.5.2+2.6.8"
|
||||||
db:
|
db:
|
||||||
image: mariadb:10.9
|
image: mariadb:11.2
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_root_password
|
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_root_password
|
||||||
- MYSQL_USER=wallabag
|
- MYSQL_USER=wallabag
|
||||||
|
@ -65,7 +64,7 @@ services:
|
||||||
- db_password
|
- db_password
|
||||||
- db_root_password
|
- db_root_password
|
||||||
redis:
|
redis:
|
||||||
image: redis:7.0.5-alpine
|
image: redis:7.2.4-alpine
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
volumes:
|
volumes:
|
||||||
|
|
|
@ -1,31 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
set -eu
|
export SYMFONY__ENV__DATABASE_PASSWORD=$(cat $SYMFONY__ENV__DATABASE_PASSWORD_FILE)
|
||||||
|
export SYMFONY__ENV__SECRET=$(cat $SYMFONY__ENV__SECRET_FILE)
|
||||||
|
|
||||||
file_env() {
|
export SYMFONY__ENV__MAILER_DSN=smtp://${SYMFONY__ENV__MAILER_USER}:$(cat ${SYMFONY__ENV__MAILER_PASSWORD_FILE})@${SYMFONY__ENV__MAILER_HOST}:465
|
||||||
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 "SYMFONY__ENV__DATABASE_PASSWORD"
|
|
||||||
file_env "SYMFONY__ENV__SECRET"
|
|
||||||
|
|
||||||
# https://github.com/wallabag/docker/blob/master/root/entrypoint.sh
|
# https://github.com/wallabag/docker/blob/master/root/entrypoint.sh
|
||||||
sh -c "/entrypoint.sh migrate"
|
sh -c "/entrypoint.sh migrate"
|
||||||
|
|
Loading…
Reference in New Issue