Browse Source

Add docker-compose.yml

master
Alex Barilaro 2 years ago
parent
commit
76f267dcc0
  1. 74
      docker-compose.yml

74
docker-compose.yml

@ -0,0 +1,74 @@
version: "2"
networks:
gitea:
external: false
volumes:
gitea:
postgres:
site:
caddy_data:
caddy_config:
services:
webhook:
image: webhook
restart: always
networks:
- ci
volumes:
- ./hooks.json:/etc/webhook/hooks.json:ro
- ./build.sh:/scripts/build.sh
- /var/run/docker.sock:/var/run/docker.sock
expose:
- "9000"
caddy:
image: caddy:alpine
restart: always
networks:
- webface
volumes:
- caddy_data:/data
- caddy_config:/config
- site:/site:ro
- ./Caddyfile:/etc/caddy/Caddyfile:ro
ports:
- "443:443"
- "80:80"
gitea:
image: gitea/gitea:latest
environment:
- USER_UID=1000
- USER_GID=1000
- DB_TYPE=postgres
- DB_HOST=db:5432
- DB_NAME=gitea
- DB_USER=gitea
- DB_PASSWD=gitea
- DOMAIN=git.yourdomain.com
- RUN_MODE=prod
restart: always
networks:
- webface
- ci
- gitea
volumes:
- gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
expose:
- "3000"
depends_on:
- db
db:
image: postgres:alpine
restart: always
environment:
- POSTGRES_USER=gitea
- POSTGRES_PASSWORD=gitea
- POSTGRES_DB=gitea
networks:
- gitea
volumes:
- postgres:/var/lib/postgresql/data
Loading…
Cancel
Save