add: postgresdb alternative
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
app:
|
||||
environment:
|
||||
- GITEA_DB_TYPE=mysql
|
||||
- GITEA_DB_HOST="db:3306"
|
||||
- GITEA_DB_NAME=gitea
|
||||
- GITEA_DB_USER=gitea
|
||||
db:
|
||||
image: "mariadb:10.9"
|
||||
command: |
|
||||
mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
|
||||
environment:
|
||||
- MYSQL_DATABASE=gitea
|
||||
- MYSQL_USER=gitea
|
||||
- MYSQL_PASSWORD_FILE=/run/secrets/db_password
|
||||
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_root_password
|
||||
secrets:
|
||||
- db_password
|
||||
- db_root_password
|
||||
volumes:
|
||||
- "mariadb:/var/lib/mysql"
|
||||
networks:
|
||||
- internal
|
||||
|
||||
secrets:
|
||||
db_password:
|
||||
name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}
|
||||
external: true
|
||||
db_root_password:
|
||||
name: ${STACK_NAME}_db_root_password_${SECRET_DB_ROOT_PASSWORD_VERSION}
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
mariadb:
|
||||
internal:
|
||||
Reference in New Issue
Block a user