You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
106 lines
2.5 KiB
106 lines
2.5 KiB
version: "3" |
|
|
|
networks: |
|
default: |
|
external: |
|
name: nginx-proxy |
|
gitea: |
|
external: false |
|
|
|
services: |
|
nginx: |
|
restart: unless-stopped |
|
image: nginx |
|
container_name: nginx |
|
networks: |
|
- default |
|
ports: |
|
- "80:80" |
|
- "443:443" |
|
volumes: |
|
- conf:/etc/nginx/conf.d |
|
- vhost:/etc/nginx/vhost.d |
|
- html:/usr/share/nginx/html |
|
- certs:/etc/nginx/certs:ro |
|
nginx-gen: |
|
restart: unless-stopped |
|
image: jwilder/docker-gen |
|
container_name: nginx-gen |
|
depends_on: |
|
- nginx |
|
command: -notify-sighup nginx -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf |
|
volumes: |
|
- /var/run/docker.sock:/tmp/docker.sock:ro |
|
- ./nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro |
|
- conf:/etc/nginx/conf.d |
|
- vhost:/etc/nginx/vhost.d |
|
- html:/usr/share/nginx/html |
|
- certs:/etc/nginx/certs:ro |
|
nginx-proxy-letsencrypt: |
|
restart: unless-stopped |
|
image: jrcs/letsencrypt-nginx-proxy-companion |
|
container_name: nginx-proxy-letsencrypt |
|
depends_on: |
|
- nginx |
|
- nginx-gen |
|
environment: |
|
NGINX_DOCKER_GEN_CONTAINER: nginx-gen |
|
NGINX_PROXY_CONTAINER: nginx |
|
volumes: |
|
- /var/run/docker.sock:/var/run/docker.sock:ro |
|
- conf:/etc/nginx/conf.d |
|
- vhost:/etc/nginx/vhost.d |
|
- html:/usr/share/nginx/html |
|
- certs:/etc/nginx/certs:rw |
|
gitea: |
|
restart: unless-stopped |
|
image: gitea/gitea:latest |
|
container_name: gitea |
|
depends_on: |
|
- db |
|
environment: |
|
USER_UID: 1000 |
|
USER_GID: 1000 |
|
APP_NAME: ${APP_NAME} |
|
PROTOCOL: ${PROTOCOL} |
|
DOMAIN: ${DOMAIN} |
|
VIRTUAL_NETWORK: nginx-proxy |
|
VIRTUAL_HOST: ${VIRTUAL_HOST} |
|
VIRTUAL_PORT: ${VIRTUAL_PORT} |
|
LETSENCRYPT_HOST: ${LETSENCRYPT_HOST} |
|
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL} |
|
DB_TYPE: postgres |
|
DB_HOST: db:5432 |
|
DB_NAME: ${DB_NAME} |
|
DB_USER: ${DB_USER} |
|
DB_PASSWD: ${DB_PASSWD} |
|
networks: |
|
- default |
|
- gitea |
|
expose: |
|
- "${VIRTUAL_PORT}" |
|
ports: |
|
- "127.0.0.1:2222:22" |
|
volumes: |
|
- /var/lib/gitea:/data |
|
- /etc/timezone:/etc/timezone:ro |
|
- /etc/localtime:/etc/localtime:ro |
|
db: |
|
restart: unless-stopped |
|
image: postgres:9.6 |
|
container_name: db |
|
environment: |
|
POSTGRES_DB: ${DB_NAME} |
|
POSTGRES_USER: ${DB_USER} |
|
POSTGRES_PASSWORD: ${DB_PASSWD} |
|
networks: |
|
- gitea |
|
volumes: |
|
- postgres:/var/lib/postgresql/data |
|
|
|
volumes: |
|
conf: |
|
vhost: |
|
html: |
|
certs: |
|
postgres:
|
|
|