Тема
Запуск за reverse proxy
- Следует отредактировать
docker-compose.yml
, в частности:
Docker-compose standalone
yml
sboard:
image: "${DOCKER_REGISTRY}/sboard:${DOCKER_IMAGE_TAG}"
restart: "always"
ports:
- 80:80
- 443:443
volumes:
- "./certs:/certs"
environment:
DOMAIN_NAME: "${DOMAIN_NAME}"
REVERSE_PROXY: "true"
depends_on:
- minio
- redis
- postgres
Docker-compose HA
yml
sboard:
image: "${DOCKER_REGISTRY}/sboard:${DOCKER_IMAGE_TAG}"
restart: "always"
ports:
- 80:80
- 443:443
volumes:
- "./certs:/certs"
environment:
DOMAIN_NAME: "${DOMAIN_NAME}"
POSTGRES_URL: "${POSTGRES_URL}"
REDIS_HOST: "${REDIS_HOST}"
REDIS_PORT: "${REDIS_PORT}"
REDIS_PASS: "${REDIS_PASS}"
S3_BUCKET: "${S3_BUCKET}"
S3_ACCESS_KEY_ID: "${S3_ACCESS_KEY_ID}"
S3_SECRET_ACCESS_KEY: "${S3_SECRET_ACCESS_KEY}"
S3_ENDPOINT: "${S3_ENDPOINT}"
REVERSE_PROXY: "true"
Примечание
В случае использования reverse proxy приложение работает только на 80 порту и не использует сертификат SSL.
- В вашем reverse proxy необходимо добавить следующие locations, пример для nginx:
upstream on-premise-nginx {
server sboard_hostname:80;
keepalive 2;
}
server {
server_name ДОМЕННОЕ ИМЯ;
listen 443 ssl;
location /socket.io {
proxy_pass http://on-premise-nginx;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
location / {
proxy_pass http://on-premise-nginx;
}
location /miro-install {
add_header Content-Type text/plain;
return 200 'Ok';
}
}
server {
listen 80;
server_name {{ app_domain_name }};
return 301 https://$host$request_uri;
}