82 lines
1.6 KiB
YAML
82 lines
1.6 KiB
YAML
|
version: "3"
|
||
|
|
||
|
networks:
|
||
|
gitea:
|
||
|
external: false
|
||
|
|
||
|
services:
|
||
|
gitea:
|
||
|
image: gitea/gitea:1.13.1
|
||
|
container_name: gitea
|
||
|
environment:
|
||
|
- USER_UID=1000
|
||
|
- USER_GID=1000
|
||
|
- DB_TYPE=postgres
|
||
|
- DB_HOST=db:5432
|
||
|
- DB_NAME=gitea
|
||
|
- DB_USER=gitea
|
||
|
- DB_PASSWD=gitea
|
||
|
restart: always
|
||
|
networks:
|
||
|
- gitea
|
||
|
volumes:
|
||
|
- ./gitea:/data
|
||
|
- /etc/timezone:/etc/timezone:ro
|
||
|
- /etc/localtime:/etc/localtime:ro
|
||
|
ports:
|
||
|
- "3000:3000"
|
||
|
- "222:22"
|
||
|
depends_on:
|
||
|
- db
|
||
|
|
||
|
db:
|
||
|
image: postgres:9.6
|
||
|
restart: always
|
||
|
environment:
|
||
|
- POSTGRES_USER=gitea
|
||
|
- POSTGRES_PASSWORD=gitea
|
||
|
- POSTGRES_DB=gitea
|
||
|
networks:
|
||
|
- gitea
|
||
|
volumes:
|
||
|
- postgres:/var/lib/postgresql/data
|
||
|
|
||
|
nginx-proxy:
|
||
|
image: jwilder/nginx-proxy
|
||
|
container_name: nginx-proxy
|
||
|
ports:
|
||
|
- "80:80"
|
||
|
- "443:443"
|
||
|
volumes:
|
||
|
- conf:/etc/nginx/conf.d
|
||
|
- vhost:/etc/nginx/vhost.d
|
||
|
- html:/usr/share/nginx/html
|
||
|
- dhparam:/etc/nginx/dhparam
|
||
|
- certs:/etc/nginx/certs:ro
|
||
|
- /var/run/docker.sock:/tmp/docker.sock:ro
|
||
|
# network_mode: bridge
|
||
|
networks:
|
||
|
- gitea
|
||
|
|
||
|
letsencrypt:
|
||
|
image: jrcs/letsencrypt-nginx-proxy-companion
|
||
|
container_name: nginx-proxy-le
|
||
|
volumes_from:
|
||
|
- nginx-proxy
|
||
|
volumes:
|
||
|
- certs:/etc/nginx/certs:rw
|
||
|
- acme:/etc/acme.sh
|
||
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||
|
networks:
|
||
|
- gitea
|
||
|
# network_mode: bridge
|
||
|
|
||
|
volumes:
|
||
|
postgres:
|
||
|
gitea:
|
||
|
conf:
|
||
|
vhost:
|
||
|
html:
|
||
|
dhparam:
|
||
|
certs:
|
||
|
acme:
|