Compare commits
7 Commits
3ab75d30a3
...
b88bae051c
Author | SHA1 | Date |
---|---|---|
Philipp Rothmann | b88bae051c | |
Philipp Rothmann | c41e724ae4 | |
3wc | 80ada7aec2 | |
decentral1se | 35296bfd17 | |
Philipp Rothmann | efcedbc7cb | |
Philipp Rothmann | 02ec691a8a | |
3wc | ed12d1636f |
|
@ -2,7 +2,9 @@ TYPE=gitea
|
|||
|
||||
DOMAIN=gitea.example.com
|
||||
LETS_ENCRYPT_ENV=production
|
||||
COMPOSE_FILE=compose.yml
|
||||
COMPOSE_FILE="compose.yml"
|
||||
COMPOSE_FILE="$COMPOSE_FILE:compose.mariadb.yml"
|
||||
# COMPOSE_FILE="$COMPOSE_FILE:compose.postgres.yml"
|
||||
|
||||
# Enable to use forgejo instead of gitea
|
||||
# COMPOSE_FILE="$COMPOSE_FILE:compose.forgejo.yml"
|
||||
|
|
|
@ -19,9 +19,9 @@
|
|||
2. Deploy [`coop-cloud/traefik`][cc-traefik]
|
||||
3. `abra app new gitea --secrets` (optionally with `--pass` if you'd like
|
||||
to save secrets in `pass`)
|
||||
4. `abra app YOURAPPDOMAIN config` - be sure to change `$DOMAIN` to something that resolves to
|
||||
4. `abra app config YOURAPPDOMAIN` - be sure to change `$DOMAIN` to something that resolves to
|
||||
your Docker swarm box
|
||||
5. `abra app YOURAPPDOMAIN deploy`
|
||||
5. `abra app deploy YOURAPPDOMAIN`
|
||||
|
||||
## Create first user
|
||||
|
||||
|
|
|
@ -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:
|
|
@ -0,0 +1,30 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
app:
|
||||
environment:
|
||||
- GITEA_DB_TYPE=postgres
|
||||
- GITEA_DB_HOST="db:5432"
|
||||
- GITEA_DB_NAME=gitea
|
||||
- GITEA_DB_USER=gitea
|
||||
db:
|
||||
image: postgres:9.6
|
||||
environment:
|
||||
- POSTGRES_DB=gitea
|
||||
- POSTGRES_USER=gitea
|
||||
- POSTGRES_PASSWORD_FILE=/run/secrets/db_password
|
||||
secrets:
|
||||
- db_password
|
||||
volumes:
|
||||
- db:/var/lib/postgresql/data
|
||||
networks:
|
||||
- internal
|
||||
|
||||
secrets:
|
||||
db_password:
|
||||
name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
db:
|
||||
internal:
|
37
compose.yml
37
compose.yml
|
@ -3,7 +3,7 @@ version: "3.8"
|
|||
|
||||
services:
|
||||
app:
|
||||
image: "gitea/gitea:1.17.3-rootless"
|
||||
image: "gitea/gitea:1.18.0-rootless"
|
||||
configs:
|
||||
- source: app_ini
|
||||
target: /etc/gitea/app.ini
|
||||
|
@ -19,10 +19,6 @@ services:
|
|||
- GITEA_ALLOW_ONLY_EXTERNAL_REGISTRATION
|
||||
- GITEA_APP_NAME
|
||||
- GITEA_AUTO_WATCH_NEW_REPOS
|
||||
- GITEA_DB_HOST="db:3306"
|
||||
- GITEA_DB_NAME=gitea
|
||||
- GITEA_DB_TYPE=mysql
|
||||
- GITEA_DB_USER=gitea
|
||||
- GITEA_DISABLE_REGISTRATION
|
||||
- GITEA_DOMAIN=${DOMAIN}
|
||||
- GITEA_ENABLE_NOTIFY_MAIL
|
||||
|
@ -38,6 +34,7 @@ services:
|
|||
- GITEA_UPDATE_AVATAR
|
||||
- GITEA_ACCOUNT_LINKING
|
||||
- GITEA_OAUTH2_CLIENT_ENABLED
|
||||
- GITEA_CORS_ALLOW_DOMAIN
|
||||
volumes:
|
||||
- data:/var/lib/gitea
|
||||
- config:/etc/gitea
|
||||
|
@ -59,24 +56,13 @@ services:
|
|||
- "traefik.tcp.routers.${STACK_NAME}-ssh.rule=HostSNI(`*`)"
|
||||
- "traefik.tcp.routers.${STACK_NAME}-ssh.entrypoints=gitea-ssh"
|
||||
- "traefik.tcp.services.${STACK_NAME}-ssh.loadbalancer.server.port=${GITEA_SSH_PORT}"
|
||||
- coop-cloud.${STACK_NAME}.version=1.3.1+1.17.3-rootless
|
||||
- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}_cors"
|
||||
- "traefik.http.middlewares.${STACK_NAME}_cors.headers.accesscontrolallowmethods=GET,OPTIONS,PUT"
|
||||
- "traefik.http.middlewares.${STACK_NAME}_cors.headers.accesscontrolalloworiginlist=https://${GITEA_CORS_ALLOW_DOMAIN}"
|
||||
- "traefik.http.middlewares.${STACK_NAME}_cors.headers.accesscontrolmaxage=100"
|
||||
- "traefik.http.middlewares.${STACK_NAME}_cors.headers.addvaryheader=true"
|
||||
- coop-cloud.${STACK_NAME}.version=2.0.0+1.18.0-rootless
|
||||
|
||||
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
|
||||
|
||||
networks:
|
||||
internal:
|
||||
|
@ -94,12 +80,6 @@ configs:
|
|||
template_driver: golang
|
||||
|
||||
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
|
||||
internal_token:
|
||||
name: ${STACK_NAME}_internal_token_${SECRET_INTERNAL_TOKEN_VERSION}
|
||||
external: true
|
||||
|
@ -113,4 +93,3 @@ secrets:
|
|||
volumes:
|
||||
data:
|
||||
config:
|
||||
mariadb:
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
This release adds the possibility to run gitea with postgres.
|
||||
Please add the following lines to your servers .env file!
|
||||
|
||||
```
|
||||
COMPOSE_FILE="compose.yml"
|
||||
COMPOSE_FILE="$COMPOSE_FILE:compose.mariadb.yml"
|
||||
# COMPOSE_FILE="$COMPOSE_FILE:compose.postgres.yml"
|
||||
```
|
Loading…
Reference in New Issue