diff --git a/compose.yml b/compose.yml index 389a832..89c81eb 100644 --- a/compose.yml +++ b/compose.yml @@ -19,6 +19,10 @@ services: configs: - source: config_ini target: /go/config.ini + - source: writefreely_entrypoint + target: /abra-entrypoint.sh + mode: 0555 + entrypoint: /abra-entrypoint.sh volumes: - "web-keys:/go/keys" networks: @@ -52,3 +56,6 @@ configs: name: ${STACK_NAME}_config_${CONFIG_WRITEFREELY_VERSION} file: config.ini.tmpl template_driver: golang + writefreely_entrypoint: + name: ${STACK_NAME}_entrypoint_${CONFIG_ENTRYPOINT_VERSION} + file: entrypoint.sh diff --git a/entrypoint.sh b/entrypoint.sh index e49b6fd..8d99c34 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,3 +1,5 @@ #!/bin/sh - -/go/cmd/writefreely/writefreely +/go/cmd/writefreely/writefreely --gen-keys > /dev/null +/go/cmd/writefreely/writefreely db init > /dev/null +/go/cmd/writefreely/writefreely db migrate > /dev/null +exec /go/cmd/writefreely/writefreely