forked from coop-cloud/gitea
23 lines
743 B
Bash
Executable File
23 lines
743 B
Bash
Executable File
#!/bin/bash
|
|
|
|
create-secrets () {
|
|
pwgen -n 32 1 | docker secret create "${STACK_NAME}_db_passwd_${DB_PASSWD_VERSION}" -
|
|
pwgen -n 105 1 | docker secret create "${STACK_NAME}_internal_token_${INTERNAL_TOKEN_VERSION}" -
|
|
pwgen -n 43 1 | docker secret create "${STACK_NAME}_jwt_secret_${JWT_SECRET_VERSION}" -
|
|
pwgen -n 64 1 | docker secret create "${STACK_NAME}_secret_key_${SECRET_KEY_VERSION}" -
|
|
}
|
|
|
|
create-admin () {
|
|
container=$(docker container ls -f "name=${STACK_NAME}_gitea" -q)
|
|
docker exec "$container" \
|
|
gitea \
|
|
--custom-path /data/gitea/ \
|
|
--config /data/gitea/conf/app.ini \
|
|
admin \
|
|
create-user \
|
|
--admin \
|
|
--username autonomic \
|
|
--password autonomic \
|
|
--email autonomic@autonomic.zone
|
|
}
|