Migrate to traefik and rename i18n to translate
This commit is contained in:
parent
049ca29e77
commit
7adc91b8b4
@ -1,10 +1,18 @@
|
||||
version: "3"
|
||||
version: "3.3"
|
||||
services:
|
||||
map:
|
||||
restart: always
|
||||
build: .
|
||||
links:
|
||||
- db:db
|
||||
- cache:cache
|
||||
networks:
|
||||
- web
|
||||
labels:
|
||||
- "traefik.backend=app"
|
||||
- "traefik.frontend.rule=Host:map.ojuso.org"
|
||||
- "traefik.frontend.priority=5"
|
||||
- "traefik.frontend.passHostHeader=true"
|
||||
volumes:
|
||||
- ./apps:/app/apps
|
||||
- ./ojusomap:/app/ojusomap
|
||||
@ -15,7 +23,10 @@ services:
|
||||
command: /bin/sh -c "python3 manage.py migrate && DEBUG=1 python3 manage.py collectstatic --noinput && gunicorn --bind 0.0.0.0:8000 ojusomap.wsgi"
|
||||
|
||||
db:
|
||||
restart: always
|
||||
image: mdillon/postgis:9.6-alpine
|
||||
networks:
|
||||
- web
|
||||
volumes:
|
||||
- /containers/db:/var/lib/postgresql/data
|
||||
- ./support/postgres/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
|
||||
@ -23,47 +34,22 @@ services:
|
||||
- "127.0.0.1:5432:5432"
|
||||
env_file:
|
||||
- ./environment
|
||||
|
||||
web:
|
||||
image: nginx:alpine
|
||||
volumes:
|
||||
- ./support/nginx/nginx.template:/etc/nginx/conf.d/nginx.template
|
||||
- ./support/nginx/directives:/etc/nginx/directives
|
||||
- /containers/tls/acme:/web/acme
|
||||
- /containers/tls/certs:/web/certs
|
||||
- /var/discourse/shared/standalone/nginx.http.sock:/web/run/discourse.sock
|
||||
- /containers/map/gunicorn.sock:/web/run/gunicorn.sock
|
||||
- /containers/map/static:/web/static
|
||||
- weblate-data:/web/weblate/data:ro
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
links:
|
||||
- forum:forum
|
||||
- map:map
|
||||
- weblate:weblate
|
||||
env_file:
|
||||
- ./environment
|
||||
command: /bin/sh -c "cat /etc/nginx/conf.d/nginx.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
|
||||
|
||||
forum:
|
||||
image: local_discourse/app
|
||||
restart: always
|
||||
hostname: discourse
|
||||
env_file:
|
||||
- ./environment
|
||||
volumes:
|
||||
- /var/discourse/shared/standalone:/shared
|
||||
- /var/discourse/shared/standalone/log/var-log:/var/log
|
||||
command: /sbin/boot
|
||||
|
||||
weblate:
|
||||
image: weblate/weblate
|
||||
links:
|
||||
- db:database
|
||||
- cache
|
||||
networks:
|
||||
- web
|
||||
labels:
|
||||
- "traefik.backend=weblate"
|
||||
- "traefik.frontend.rule=Host:translate.ojuso.org"
|
||||
- "traefik.frontend.priority=5"
|
||||
- "traefik.frontend.passHostHeader=true"
|
||||
volumes:
|
||||
- weblate-data:/app/data
|
||||
|
||||
env_file:
|
||||
- ./environment
|
||||
environment:
|
||||
@ -74,6 +60,57 @@ services:
|
||||
cache:
|
||||
image: memcached:1.4
|
||||
restart: always
|
||||
networks:
|
||||
- web
|
||||
|
||||
jenkins:
|
||||
image: jenkins:alpine
|
||||
restart: always
|
||||
networks:
|
||||
- web
|
||||
labels:
|
||||
- "traefik.backend=jenkins"
|
||||
- "traefik.frontend.rule=Host:jenkins.ojuso.org"
|
||||
- "traefik.frontend.priority=5"
|
||||
- "traefik.frontend.passHostHeader=true"
|
||||
volumes:
|
||||
- /containers/jenkins:/var/jenkins_home
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
|
||||
static:
|
||||
image: nginx:alpine
|
||||
restart: always
|
||||
labels:
|
||||
- "traefik.backend=static"
|
||||
- "traefik.frontend.rule=Host:map.ojuso.org;PathPrefixStrip:/static/"
|
||||
- "traefik.frontend.priority=10"
|
||||
networks:
|
||||
- web
|
||||
volumes:
|
||||
- /containers/map/static:/usr/share/nginx/html:ro
|
||||
|
||||
weblate_static:
|
||||
image: nginx:alpine
|
||||
restart: always
|
||||
depends_on:
|
||||
- weblate
|
||||
labels:
|
||||
- "traefik.backend=weblate_static"
|
||||
- "traefik.frontend.rule=Host:translate.ojuso.org;PathPrefixStrip:/static/"
|
||||
- "traefik.frontend.priority=10"
|
||||
networks:
|
||||
- web
|
||||
volumes:
|
||||
- type: bind
|
||||
source: /var/lib/docker/volumes/ojusomap_weblate-data/_data/static
|
||||
target: /usr/share/nginx/html
|
||||
read_only: true
|
||||
|
||||
networks:
|
||||
web:
|
||||
external:
|
||||
name: traefik_webgateway
|
||||
|
||||
volumes:
|
||||
weblate-data:
|
||||
weblate-static:
|
||||
|
@ -40,29 +40,29 @@ server {
|
||||
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name forum.ojuso.org;
|
||||
|
||||
ssl_certificate /web/certs/forum.ojuso.org/fullchain.pem;
|
||||
ssl_certificate_key /web/certs/forum.ojuso.org/privkey.pem;
|
||||
ssl_dhparam /web/certs/dhparam.pem;
|
||||
ssl_trusted_certificate /web/certs/map.ojuso.org/chain.pem;
|
||||
|
||||
include directives/*;
|
||||
|
||||
http2_idle_timeout 5m;
|
||||
|
||||
location / {
|
||||
proxy_pass http://unix:/web/run/discourse.sock:;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
}
|
||||
|
||||
}
|
||||
#server {
|
||||
# listen 443 ssl http2;
|
||||
# listen [::]:443 ssl http2;
|
||||
# server_name forum.ojuso.org;
|
||||
#
|
||||
# ssl_certificate /web/certs/forum.ojuso.org/fullchain.pem;
|
||||
# ssl_certificate_key /web/certs/forum.ojuso.org/privkey.pem;
|
||||
# ssl_dhparam /web/certs/dhparam.pem;
|
||||
# ssl_trusted_certificate /web/certs/map.ojuso.org/chain.pem;
|
||||
#
|
||||
# include directives/*;
|
||||
#
|
||||
# http2_idle_timeout 5m;
|
||||
#
|
||||
# location / {
|
||||
# proxy_pass http://unix:/web/run/discourse.sock:;
|
||||
# proxy_set_header Host $http_host;
|
||||
# proxy_http_version 1.1;
|
||||
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
# proxy_set_header X-Forwarded-Proto https;
|
||||
# }
|
||||
#
|
||||
#}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
@ -78,6 +78,26 @@ server {
|
||||
|
||||
http2_idle_timeout 5m;
|
||||
|
||||
location / {
|
||||
return 301 https://translate.ojuso.org$request_uri;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name translate.ojuso.org;
|
||||
|
||||
ssl_certificate /web/certs/translate.ojuso.org/fullchain.pem;
|
||||
ssl_certificate_key /web/certs/translate.ojuso.org/privkey.pem;
|
||||
ssl_dhparam /web/certs/dhparam.pem;
|
||||
ssl_trusted_certificate /web/certs/translate.ojuso.org/chain.pem;
|
||||
|
||||
include directives/*;
|
||||
|
||||
http2_idle_timeout 5m;
|
||||
|
||||
root /web/weblate/data/static;
|
||||
|
||||
location /favicon.ico {
|
||||
|
Loading…
Reference in New Issue
Block a user