ДОбавлен контейнер со статикой

This commit is contained in:
Sergey Kalinin 2021-04-09 13:27:46 +03:00
parent e54725bb31
commit 1d2f2258a1
7 changed files with 132 additions and 82 deletions

View File

@ -1,82 +0,0 @@
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:

View File

@ -0,0 +1,3 @@
URL=git.nuk-svk.ru
NETWORK=proxy_proxy-tier
DB_PASSWD=5BpfiZRZKBHHgZ5B

View File

@ -0,0 +1,61 @@
version: "2"
volumes:
gitea-db:
driver: local
services:
server:
image: gitea/gitea:1
env_file:
- .env
environment:
- USER_UID=1000
- USER_GID=1000
- DB_TYPE=postgres
- DB_HOST=db:5432
- DB_NAME=gitea
- DB_USER=gitea
- DB_PASSWD=${DB_PASSWD}
- DOMAIN=${URL}
- SSH_DOMAIN=${URL}
- DISABLE_REGISTRATION=true
- VIRTUAL_HOST=${URL}
- VIRTUAL_PORT=3000
- LETSENCRYPT_HOST=${URL}
- LETSENCRYPT_EMAIL=svk@nuk-svk.ru
- ROOT_URL=https://${URL}
- REDIRECT_OTHER_PORT=true
- PORT_TO_REDIRECT=463
- ENABLE_PUSH_CREATE_USER=true
- ENABLE_PUSH_CREATE_ORG=true
restart: always
volumes:
- gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "2222:22"
depends_on:
- db
expose:
- 3000
db:
image: postgres:9.6
restart: always
env_file:
- .env
environment:
- POSTGRES_USER=gitea
- POSTGRES_PASSWORD=${DB_PASSWD}
- POSTGRES_DB=gitea
volumes:
- gitea-db:/var/lib/postgresql/data
networks:
default:
external:
name: ${NETWORK}
volumes:
gitea:
gitea-db:

View File

@ -0,0 +1,3 @@
FROM jwilder/nginx-proxy:alpine
COPY uploadsize.conf /etc/nginx/conf.d/uploadsize.conf

View File

@ -0,0 +1,39 @@
version: '3'
services:
proxy:
build: ./
restart: always
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-tier
letsencrypt-companion:
image: jrcs/letsencrypt-nginx-proxy-companion
restart: always
volumes:
- certs:/etc/nginx/certs
- vhost.d:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- proxy-tier
depends_on:
- proxy
volumes:
certs:
vhost.d:
html:
networks:
proxy-tier:

View File

@ -0,0 +1,2 @@
client_max_body_size 10G;
proxy_request_buffering off;

View File

@ -0,0 +1,24 @@
version: '2'
services:
static:
image: nginx
container_name: nginx-static
restart: always
environment:
- VIRTUAL_HOST=nuk-svk.ru
- LETSENCRYPT_HOST=nuk-svk.ru
#- VIRTUAL_PORT=443
#- VIRTUAL_PROTO=https
volumes:
- vhost.d:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
volumes:
vhost.d:
html:
networks:
default:
external:
name: proxy_proxy-tier