[TUTORIAL] SUPLA-DOCKER z użyciem Docker-Compose + CloudFlare + Proxy

plnuker
Posts: 97
Joined: Sun Dec 30, 2018 10:11 pm

Post

Caly stack supla cloud do portainera

Code: Select all

version: '3'

services:
  supla-cloud:
    environment:
     ADMIN_EMAIL: ${ADMIN_LOGIN}
     CLOUD_DOMAIN: ${SUPLA_DOMAIN}
     SUPLA_PROTOCOL: https
     # Firtst User & Registration
     FIRST_USER_EMAIL: ${ADMIN_LOGIN}
     FIRST_USER_PASSWORD: ${ADMIN_PASSWORD}
     ACCOUNTS_REGISTRATION_ENABLED: ${ACCOUNTS_REGISTRATION_ENABLED}
     REQUIRE_REGULATIONS_ACCEPTANCE: ${REQUIRE_REGULATIONS_ACCEPTANCE}
     REQUIRE_COOKIE_POLICY_ACCEPTANCE: ${REQUIRE_COOKIE_POLICY_ACCEPTANCE}
     BRUTE_FORCE_AUTH_PREVENTION_ENABLED: ${BRUTE_FORCE_AUTH_PREVENTION_ENABLED}
     # ReCaptcha
     RECAPTCHA_ENABLED: ${RECAPTCHA_ENABLED}
     RECAPTCHA_PRIVATE_KEY: ${RECAPTCHA_PRIVATE_KEY}
     RECAPTCHA_PUBLIC_KEY: ${RECAPTCHA_PUBLIC_KEY}
     # Mailer settings (SMTP)
     MAILER_HOST: ${MAILER_HOST}
     MAILER_PORT: ${MAILER_PORT}
     MAILER_USER: ${MAILER_USER}
     MAILER_PASSWORD: ${MAILER_PASSWORD}
     MAILER_ENCRYPTION: ${MAILER_ENCRYPTION}
     MAILER_FROM: ${MAILER_FROM}
     # These options protect your application
     DB_PASSWORD: ${DB_PASSWORD}
     SECRET: ${SECRET}
     # MQTT Broker
     MQTT_BROKER_ENABLED: ${MQTT_BROKER_ENABLED}
     MQTT_BROKER_HOST: ${MQTT_BROKER_HOST}
     MQTT_BROKER_PORT: ${MQTT_BROKER_PORT}
     MQTT_BROKER_TLS: ${MQTT_BROKER_TLS}
     MQTT_BROKER_USERNAME: ${MQTT_BROKER_USERNAME}
     MQTT_BROKER_PASSWORD: ${MQTT_BROKER_PASSWORD}
     MQTT_BROKER_CLIENT_ID: ${MQTT_BROKER_CLIENT_ID}

    container_name: ${COMPOSE_PROJECT_NAME}-cloud
    image: supla/supla-cloud:${IMAGE_VERSION}
    links:
    - supla-db:supla-db
    - supla-server:supla-server
    ports:
    - ${HTTPS_PORT}:443
    restart: always
    volumes:
    - ${SUPLA_FOLDER}/ssl/cloud:/etc/apache2/ssl:z
    - ${SUPLA_FOLDER}/server:/supla-server:z
    - ${SUPLA_FOLDER}/cloud-local:/var/www/cloud/var/local
    - ${SUPLA_FOLDER}/cloud-logs:/var/www/cloud/var/logs
    healthcheck:
      test: ["CMD", "curl", "-fk", "https://localhost:443" ]
      interval: 1m30s
      timeout: 10s
      retries: 3
      start_period: 30s
      disable : false
  supla-db:
    environment:
     MYSQL_DATABASE: supla
     MYSQL_PASSWORD: ${DB_PASSWORD}
     MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
     MYSQL_USER: supla
    container_name: ${COMPOSE_PROJECT_NAME}-db
    image: mysql:5.7.20
    ports:
    - ${DB_PORT}:3306
    restart: always
    volumes:
    - ${SUPLA_FOLDER}/mysql:/var/lib/mysql:z
    
  supla-server:
    environment:
     DB_PASSWORD: ${DB_PASSWORD}
     CLOUD_DOMAIN: ${SUPLA_DOMAIN}
     # MQTT Broker
     MQTT_BROKER_ENABLED: ${MQTT_BROKER_ENABLED}
     MQTT_BROKER_HOST: ${MQTT_BROKER_HOST}
     MQTT_BROKER_PORT: ${MQTT_BROKER_PORT}
     MQTT_BROKER_TLS: ${MQTT_BROKER_TLS}
     MQTT_BROKER_USERNAME: ${MQTT_BROKER_USERNAME}
     MQTT_BROKER_PASSWORD: ${MQTT_BROKER_PASSWORD}
     MQTT_BROKER_CLIENT_ID: ${MQTT_BROKER_CLIENT_ID}
    container_name: ${COMPOSE_PROJECT_NAME}-server
    image: supla/supla-server:${IMAGE_VERSION}
    links:
    - supla-db:supla-db
    ports:
    - 2016:2016
    - 2015:2015

    restart: always
    volumes:
    - ${SUPLA_FOLDER}/ssl/server:/etc/supla-server/ssl:z
    - ${SUPLA_FOLDER}/server:/var/run/supla:z
    healthcheck:
      test: ["CMD-SHELL", 'echo "Q" | openssl s_client -connect localhost:2016']
      interval: 1m30s
      timeout: 10s
      retries: 3
      start_period: 30s
      disable : false
PawelGawel
Posts: 71
Joined: Wed Mar 10, 2021 6:24 am

Post

@klimasstudio musisz pomoc ;)

Zrobilem wszystko wg twojego manaula .

dokery
SSLe
ngix proxy itp itd..

na cloudflare mam ustawione jak w zalaczniku i nie moge sie dostac do supla.mojadomena.org :geek: - tak jakby wogole nie istnialo.

lokalnie 192.168.1.1:6443 jest ok
z zewnatrz po ip 123.123.123.123:6443 jest ok
w proxy managerze tak naprawde nie ma sie gdzie pomylic ...



cala reszta chodzi jak zloto, nie jestem pewien czy na cloudflare te wpisy maja byc dns only czy proxies... juz tyle razy poklikalem ze sam sie zakrecilem
You do not have the required permissions to view the files attached to this post.
User avatar
klimasstudio
Posts: 1142
Joined: Wed Aug 28, 2019 9:35 pm
Location: localhost

Post

W CloudFlare podajesz swoje IP publiczne DNS Only. Na swoim routerze musisz przekierować porty z WAN do LAN na konkretne IPlokalny i port.
Więc chodź OSUPLUJE Ci dom :mrgreen:

Druk 3D - > https://klimastech.eu.org/druk-3d
PawelGawel
Posts: 71
Joined: Wed Mar 10, 2021 6:24 am

Post

dobra, glupi blad .

supla.domena:port - tak dziala bez dotykania od wczorajszego stanu. Wczesniej usilowalem szukac pod supla.domena( na defaultowym porcie)
karnasw
Posts: 197
Joined: Fri Oct 02, 2020 10:22 am

Post

Po zainstalowaniu na architekturze amd64 wciąż mam status unhealthy. Nie jest to powiązane z architekturą jednak? Czy standardowy sposób instalacji supla-docker też ma status unhealthy?
effendi_pl
Posts: 9
Joined: Tue Jun 19, 2018 7:50 am

Post

Zerknij tutaj viewtopic.php?t=4081&hilit=502+bad+gateway&start=830
Co prawda nadal walczę, ale część Twoich problemów już za mną ;)

Return to “FAQ / Jak to zrobić”