parent
33d6f5819c
commit
047dac8d21
38
compose.yml
38
compose.yml
|
@ -2,29 +2,6 @@
|
||||||
version: "3.8"
|
version: "3.8"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
web:
|
|
||||||
image: nginx:1.20.0
|
|
||||||
networks:
|
|
||||||
- proxy
|
|
||||||
- internal
|
|
||||||
environment:
|
|
||||||
- DISABLE_FEDERATION
|
|
||||||
- DOMAIN
|
|
||||||
- STACK_NAME
|
|
||||||
configs:
|
|
||||||
- source: nginx_config
|
|
||||||
target: /etc/nginx/nginx.conf
|
|
||||||
deploy:
|
|
||||||
restart_policy:
|
|
||||||
condition: on-failure
|
|
||||||
labels:
|
|
||||||
- "traefik.enable=true"
|
|
||||||
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=80"
|
|
||||||
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`)"
|
|
||||||
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
|
|
||||||
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
|
||||||
- "coop-cloud.${STACK_NAME}.version=0.1.0+v1.48.0"
|
|
||||||
|
|
||||||
app:
|
app:
|
||||||
image: "matrixdotorg/synapse:v1.48.0"
|
image: "matrixdotorg/synapse:v1.48.0"
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -45,6 +22,7 @@ services:
|
||||||
- VIRTUAL_HOST=${DOMAIN}
|
- VIRTUAL_HOST=${DOMAIN}
|
||||||
- VIRTUAL_PORT=8008
|
- VIRTUAL_PORT=8008
|
||||||
networks:
|
networks:
|
||||||
|
- proxy
|
||||||
- internal
|
- internal
|
||||||
entrypoint: /docker-entrypoint.sh
|
entrypoint: /docker-entrypoint.sh
|
||||||
configs:
|
configs:
|
||||||
|
@ -55,6 +33,16 @@ services:
|
||||||
- source: entrypoint_conf
|
- source: entrypoint_conf
|
||||||
target: /docker-entrypoint.sh
|
target: /docker-entrypoint.sh
|
||||||
mode: 0555
|
mode: 0555
|
||||||
|
deploy:
|
||||||
|
restart_policy:
|
||||||
|
condition: on-failure
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=8008"
|
||||||
|
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`)"
|
||||||
|
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
|
||||||
|
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
||||||
|
- "coop-cloud.${STACK_NAME}.version=0.1.0+v1.48.0"
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: postgres:13-alpine
|
image: postgres:13-alpine
|
||||||
|
@ -90,10 +78,6 @@ configs:
|
||||||
name: ${STACK_NAME}_homserver_yaml_${HOMESERVER_YAML_VERSION}
|
name: ${STACK_NAME}_homserver_yaml_${HOMESERVER_YAML_VERSION}
|
||||||
file: homeserver.yaml.tmpl
|
file: homeserver.yaml.tmpl
|
||||||
template_driver: golang
|
template_driver: golang
|
||||||
nginx_config:
|
|
||||||
name: ${STACK_NAME}_nginx_config_${NGINX_CONFIG_VERSION}
|
|
||||||
file: nginx.conf.tmpl
|
|
||||||
template_driver: golang
|
|
||||||
log_config:
|
log_config:
|
||||||
name: ${STACK_NAME}_log_config_${LOG_CONFIG_VERSION}
|
name: ${STACK_NAME}_log_config_${LOG_CONFIG_VERSION}
|
||||||
file: log.config.tmpl
|
file: log.config.tmpl
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
user www-data;
|
|
||||||
|
|
||||||
events {
|
|
||||||
worker_connections 768;
|
|
||||||
}
|
|
||||||
|
|
||||||
http {
|
|
||||||
upstream backend {
|
|
||||||
server {{ env "STACK_NAME" }}_app:8008;
|
|
||||||
}
|
|
||||||
|
|
||||||
include /etc/nginx/mime.types;
|
|
||||||
|
|
||||||
server {
|
|
||||||
listen 80 default_server;
|
|
||||||
server_name {{ env "DOMAIN" }};
|
|
||||||
|
|
||||||
location / {
|
|
||||||
proxy_pass http://backend;
|
|
||||||
proxy_set_header X-Forwarded-For $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
client_max_body_size 50M;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue