2022-07-08 05:44:18 +00:00
|
|
|
version: '3.6'
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
certs:
|
|
|
|
acme:
|
|
|
|
html:
|
|
|
|
|
|
|
|
networks:
|
|
|
|
proxy:
|
|
|
|
gitea:
|
|
|
|
external: false
|
|
|
|
|
|
|
|
services:
|
|
|
|
gitea:
|
|
|
|
image: gitea/gitea:latest
|
|
|
|
container_name: gitea
|
2022-07-09 04:42:38 +00:00
|
|
|
restart: always
|
2022-07-08 05:44:18 +00:00
|
|
|
environment:
|
|
|
|
- USER_UID=1000
|
|
|
|
- USER_GID=1000
|
|
|
|
- GITEA__database__DB_TYPE=postgres
|
|
|
|
- GITEA__database__HOST=gitea-db:5432
|
|
|
|
- GITEA__database__NAME=gitea
|
|
|
|
- GITEA__database__USER=gitea
|
|
|
|
- GITEA__database__PASSWD=gitea
|
2022-07-09 04:31:14 +00:00
|
|
|
- GITEA__repository__ENABLE_PUSH_CREATE_USER=true
|
|
|
|
- GITEA__repository__ENABLE_PUSH_CREATE_ORG=true
|
2022-07-09 02:36:54 +00:00
|
|
|
- VIRTUAL_HOST=code.othoulrich.com
|
2022-07-08 05:44:18 +00:00
|
|
|
- VIRTUAL_PORT=3000
|
2022-07-09 02:36:54 +00:00
|
|
|
- LETSENCRYPT_HOST=code.othoulrich.com
|
2022-07-08 05:44:18 +00:00
|
|
|
networks:
|
|
|
|
- gitea
|
|
|
|
- proxy
|
|
|
|
volumes:
|
|
|
|
- ./.data/gitea:/data
|
|
|
|
- /etc/timezone:/etc/timezone:ro
|
|
|
|
- /etc/localtime:/etc/localtime:ro
|
|
|
|
ports:
|
|
|
|
- "922:22"
|
|
|
|
depends_on:
|
|
|
|
- gitea-db
|
|
|
|
|
|
|
|
gitea-db:
|
|
|
|
image: postgres:14
|
|
|
|
container_name: gitea-db
|
|
|
|
restart: always
|
|
|
|
environment:
|
|
|
|
- POSTGRES_USER=gitea
|
|
|
|
- POSTGRES_PASSWORD=gitea
|
|
|
|
- POSTGRES_DB=gitea
|
|
|
|
networks:
|
|
|
|
- gitea
|
|
|
|
volumes:
|
|
|
|
- ./.data/gitea-db:/var/lib/postgresql/data
|
|
|
|
|
2022-07-09 04:13:07 +00:00
|
|
|
apache:
|
|
|
|
image: httpd:2.4
|
|
|
|
container_name: apache
|
|
|
|
restart: always
|
|
|
|
environment:
|
|
|
|
- VIRTUAL_HOST=www.othoulrich.com,othoulrich.com
|
|
|
|
networks:
|
|
|
|
- proxy
|
|
|
|
volumes:
|
|
|
|
- ./htdocs:/usr/local/apache2/htdocs
|
2022-07-09 02:36:54 +00:00
|
|
|
|
2022-07-08 05:44:18 +00:00
|
|
|
####################################3
|
|
|
|
## nginx proxy
|
|
|
|
|
|
|
|
nginx-proxy:
|
|
|
|
image: nginxproxy/nginx-proxy
|
|
|
|
container_name: nginx-proxy
|
|
|
|
restart: always
|
2022-07-09 04:42:38 +00:00
|
|
|
environment:
|
|
|
|
- DEFAULT_ROOT="301 http://www.othoulrich.com"
|
2022-07-08 05:44:18 +00:00
|
|
|
ports:
|
|
|
|
- 80:80
|
|
|
|
- 443:443
|
|
|
|
labels:
|
|
|
|
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
|
|
|
|
volumes:
|
|
|
|
- certs:/etc/nginx/certs:ro
|
|
|
|
- ./vhost.d:/etc/nginx/vhost.d
|
|
|
|
- html:/usr/share/nginx/html
|
|
|
|
- /var/run/docker.sock:/tmp/docker.sock:ro
|
|
|
|
networks:
|
|
|
|
- proxy
|
|
|
|
|
|
|
|
letsencrypt-companion:
|
|
|
|
image: nginxproxy/acme-companion
|
|
|
|
container_name: acme-companion
|
|
|
|
restart: always
|
|
|
|
volumes:
|
|
|
|
- certs:/etc/nginx/certs
|
|
|
|
- acme:/etc/acme.sh
|
|
|
|
- ./vhost.d:/etc/nginx/vhost.d
|
|
|
|
- html:/usr/share/nginx/html
|
|
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
|
|
networks:
|
|
|
|
- proxy
|
|
|
|
depends_on:
|
|
|
|
- nginx-proxy
|