61 lines
1.5 KiB
Plaintext
61 lines
1.5 KiB
Plaintext
|
version: "{{ compose_version }}"
|
||
|
|
||
|
networks:
|
||
|
proxy:
|
||
|
name: "{{ traefik_network }}"
|
||
|
db:
|
||
|
name: gitea_db
|
||
|
|
||
|
volumes:
|
||
|
app:
|
||
|
name: gitea_app
|
||
|
db:
|
||
|
name: gitea_db
|
||
|
|
||
|
services:
|
||
|
server:
|
||
|
image: gitea/gitea:{{ gitea_version }}
|
||
|
container_name: gitea
|
||
|
environment:
|
||
|
USER_UID: 1000
|
||
|
USER_GID: 1000
|
||
|
DB_TYPE: postgres
|
||
|
DB_HOST: db:5432
|
||
|
APP_NAME: {{ gitea_name }}
|
||
|
RUN_MODE: prod
|
||
|
DOMAIN: {{ gitea_subdomain }}.{{ domain_name }}
|
||
|
SSH_DOMAIN: {{ gitea_subdomain }}.{{ domain_name }}
|
||
|
ROOT_URL: https://{{ gitea_subdomain }}.{{ domain_name }}
|
||
|
DISABLE_REGISTRATION: "true"
|
||
|
DB_NAME: gitea
|
||
|
DB_USER: gitea
|
||
|
DB_PASSWD: "{{ gitea_db_password }}"
|
||
|
networks:
|
||
|
- proxy
|
||
|
- db
|
||
|
volumes:
|
||
|
- app:/data
|
||
|
- /etc/timezone:/etc/timezone:ro
|
||
|
- /etc/localtime:/etc/localtime:ro
|
||
|
ports:
|
||
|
- "{{ gitea_ssh_host_port }}:22"
|
||
|
labels:
|
||
|
traefik.http.routers.gitea.entrypoints: websecure
|
||
|
traefik.http.routers.gitea.rule: "Host(`{{ gitea_subdomain }}.{{ domain_name }}`)"
|
||
|
traefik.http.services.gitea.loadbalancer.server.port: 3000
|
||
|
traefik.enable: true
|
||
|
restart: unless-stopped
|
||
|
|
||
|
db:
|
||
|
image: postgres:{{ postgres_version }}
|
||
|
container_name: gitea-db
|
||
|
environment:
|
||
|
POSTGRES_USER: gitea
|
||
|
POSTGRES_DB: gitea
|
||
|
POSTGRES_PASSWORD: "{{ gitea_db_password }}"
|
||
|
volumes:
|
||
|
- db:/var/lib/postgresql/data
|
||
|
networks:
|
||
|
- db
|
||
|
restart: unless-stopped
|