generated from coop-cloud/example
fix: run key generation and db migration at startup
This commit is contained in:
@ -19,6 +19,10 @@ services:
|
|||||||
configs:
|
configs:
|
||||||
- source: config_ini
|
- source: config_ini
|
||||||
target: /go/config.ini
|
target: /go/config.ini
|
||||||
|
- source: writefreely_entrypoint
|
||||||
|
target: /abra-entrypoint.sh
|
||||||
|
mode: 0555
|
||||||
|
entrypoint: /abra-entrypoint.sh
|
||||||
volumes:
|
volumes:
|
||||||
- "web-keys:/go/keys"
|
- "web-keys:/go/keys"
|
||||||
networks:
|
networks:
|
||||||
@ -52,3 +56,6 @@ configs:
|
|||||||
name: ${STACK_NAME}_config_${CONFIG_WRITEFREELY_VERSION}
|
name: ${STACK_NAME}_config_${CONFIG_WRITEFREELY_VERSION}
|
||||||
file: config.ini.tmpl
|
file: config.ini.tmpl
|
||||||
template_driver: golang
|
template_driver: golang
|
||||||
|
writefreely_entrypoint:
|
||||||
|
name: ${STACK_NAME}_entrypoint_${CONFIG_ENTRYPOINT_VERSION}
|
||||||
|
file: entrypoint.sh
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
/go/cmd/writefreely/writefreely --gen-keys > /dev/null
|
||||||
/go/cmd/writefreely/writefreely
|
/go/cmd/writefreely/writefreely db init > /dev/null
|
||||||
|
/go/cmd/writefreely/writefreely db migrate > /dev/null
|
||||||
|
exec /go/cmd/writefreely/writefreely
|
||||||
|
Reference in New Issue
Block a user