fix entrypoint config

This commit is contained in:
blu 2024-03-15 17:39:42 +01:00
parent d97a1c9e48
commit 125838948c
Signed by: blu
GPG Key ID: 9DF47BD2E647A7D6
3 changed files with 17 additions and 7 deletions

View File

@ -1,3 +1,8 @@
ENTRYPOINT_CONF_VERSION=1
### Helpers
# these commands can be run via: abra app cmd open-inventory.example.net app $commandName ($commandName: clear_cache, ...)
initial_setup() { initial_setup() {
cd /app/ cd /app/

View File

@ -2,14 +2,18 @@ version: '3.8'
services: services:
app: app:
# Dockerfile here: # Dockerfile here: https://codeberg.org/eotl/open-inventory/src/branch/main/docker/prod/Dockerfile
image: codeberg.org/eotl/open-inventory:0.0.8 image: codeberg.org/eotl/open-inventory:0.0.8
entrypoint: ./entrypoint.sh
depends_on: depends_on:
- db - db
networks: networks:
- proxy - proxy
- internal - internal
entrypoint: /abra-entrypoint.sh
configs:
- source: entrypoint_conf
target: /abra-entrypoint.sh
mode: 0555
environment: environment:
- DB_PASSWORD_FILE = /run/secrets/db_password - DB_PASSWORD_FILE = /run/secrets/db_password
secrets: secrets:
@ -32,7 +36,6 @@ services:
- "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=1.0.0+0.0.5" - "coop-cloud.${STACK_NAME}.version=1.0.0+0.0.5"
db: db:
image: mariadb:10.5 image: mariadb:10.5
init: true init: true
@ -67,3 +70,9 @@ secrets:
db_root_password: db_root_password:
external: true external: true
name: ${STACK_NAME}_db_root_password_${DB_ROOT_PASSWORD_VERSION} name: ${STACK_NAME}_db_root_password_${DB_ROOT_PASSWORD_VERSION}
configs:
entrypoint_conf:
name: ${STACK_NAME}_entrypoint_${ENTRYPOINT_CONF_VERSION}
file: entrypoint.sh.tmpl.tmpl
template_driver: golang

View File

@ -3,10 +3,6 @@
# Laravel app (+ nginx) container # Laravel app (+ nginx) container
export DB_PASSWORD=$(cat /run/secrets/db_password) export DB_PASSWORD=$(cat /run/secrets/db_password)
# DB container
export MYSQL_PASSWORD=$(cat /run/secrets/db_password)
export MYSQL_ROOT_PASSWORD=$(cat /run/secrets/db_root_password)
# Upstream ENTRYPOINT # Upstream ENTRYPOINT
# https://codeberg.org/eotl/open-inventory/src/branch/main/docker/prod/Dockerfile # https://codeberg.org/eotl/open-inventory/src/branch/main/docker/prod/Dockerfile
/app/docker/entrypoint.sh /app/docker/entrypoint.sh