SUPLA i SUPLA Scripts na jednej maszynie (docker proxy)

Moderator: fracz

Awatar użytkownika
Lector
Posty: 1393
Rejestracja: pt lis 17, 2017 2:26 pm
Lokalizacja: Poznań
Kontakt:

Podaj adres:81 czyli adres dwukropek i port jaki ustawiłeś.
Niespełniony automatyk. :mrgreen:
https://3d-lamp.photos/
maniek
Posty: 19
Rejestracja: ndz paź 15, 2017 7:21 pm

Wpisałem 192.168.1.111:81 i ,,ta witryna nie umożliwia bezpiecznego połączenia,,
maniek
Posty: 19
Rejestracja: ndz paź 15, 2017 7:21 pm

Lector poprawiłem 192.168.1.111:444 i działa. Jestem bardziej zielony niż Supla ale się uczę, dzięki
cino111
Posty: 714
Rejestracja: pn maja 07, 2018 8:00 pm

Witam
Czy jest szansa na obraz karty na Raspberry pi 3 z Supla cloud i Supla Scripts? Jakoś nie mogę ogarnąć Linuxa :oops:
Obraz do wgrania na kartę dla Supla cloud znalazłem, ale bez termostatu to za mało :D
vuhazu
Posty: 34
Rejestracja: śr gru 21, 2016 2:19 pm

Kod: Zaznacz cały

root@orangepizero:~# docker logs --since=5m supla-cloud
2018-06-02 14:30:21,112 WARN received SIGTERM indicating exit request
2018-06-02 14:30:21,146 INFO waiting for apache, cron to die
2018-06-02 14:30:21,158 INFO stopped: cron (terminated by SIGTERM)
[Sat Jun 02 14:30:22.564659 2018] [mpm_prefork:notice] [pid 50] AH00169: caught SIGTERM, shutting down
2018-06-02 14:30:22,697 INFO stopped: apache (exit status 0)
Database connection has been established.

                    Application Migrations


No migrations to execute.

 // Warming up the cache for the prod environment with debug
 // false

 [OK] Cache for the "prod" environment (debug=false) was successfully warmed.

User admin@gmail.com already exists.
2018-06-02 14:31:54,643 CRIT Supervisor running as root (no user in config file)
2018-06-02 14:31:54,671 INFO supervisord started with pid 1
2018-06-02 14:31:55,679 INFO spawned: 'apache' with pid 49
2018-06-02 14:31:55,689 INFO spawned: 'cron' with pid 50
2018-06-02 14:31:56,693 INFO success: apache entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-06-02 14:31:56,694 INFO success: cron entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.20.0.5. Set the 'ServerName' directive globally to suppress this message
[Sat Jun 02 14:31:56.763133 2018] [ssl:warn] [pid 49] AH01906: 172.20.0.5:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sat Jun 02 14:31:56.763459 2018] [ssl:warn] [pid 49] AH01909: 172.20.0.5:443:0 server certificate does NOT include an ID which matches the server name
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.20.0.5. Set the 'ServerName' directive globally to suppress this message
[Sat Jun 02 14:31:57.447351 2018] [ssl:warn] [pid 49] AH01906: 172.20.0.5:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sat Jun 02 14:31:57.447593 2018] [ssl:warn] [pid 49] AH01909: 172.20.0.5:443:0 server certificate does NOT include an ID which matches the server name
[Sat Jun 02 14:31:57.472974 2018] [mpm_prefork:notice] [pid 49] AH00163: Apache/2.4.10 (Debian) PHP/7.0.26 OpenSSL/1.0.1t configured -- resuming normal operations
[Sat Jun 02 14:31:57.473157 2018] [core:notice] [pid 49] AH00094: Command line: 'apache2 -D FOREGROUND'

I follow the instructions
But this error is detected

Kod: Zaznacz cały

#
# docker-compose-letsencrypt-nginx-proxy-companion
# 
# A Web Proxy using docker with NGINX and Let's Encrypt
# Using the great community docker-gen, nginx-proxy and docker-letsencrypt-nginx-proxy-companion
#
# This is the .env file to set up your webproxy enviornment

#
# Your local containers NAME
#
NGINX_WEB=nginx-web
DOCKER_GEN=nginx-gen
LETS_ENCRYPT=nginx-letsencrypt

#
# Your external IP address
#
IP=0.0.0.0

#
# Default Network
#
NETWORK=webproxy

#
# Service Network (Optional)
#
# In case you decide to add a new network to your services containers you can set this
# network as a SERVICE_NETWORK
#
# [WARNING] This setting was built to use our `start.sh` script or in that special case
#           you could use the docker-composer with our multiple network option, as of:
#           `docker-compose -f docker-compose-multiple-networks.yml up -d`
#
#SERVICE_NETWORK=webservices

#
# NGINX file path
#
NGINX_FILES_PATH=/path/to/your/nginx/data

#
# NGINX use special conf files 
#
# In case you want to add some special configuration to your NGINX Web Proxy you could 
# add your files to ./conf.d/ folder as of sample file 'uploadsize.conf'
#
# [WARNING] This setting was built to use our `start.sh`.
#
# [WARNING] Once you set this options to true all your files will be copied to data
#           folder (./data/conf.d). If you decide to remove this special configuration
#           you must delete your files from data folder ./data/conf.d. 
#
#USE_NGINX_CONF_FILES=true

#
# Docker Logging Config
#
# This section offers two options max-size and max-file, which follow the docker documentation
# as follow:
#
# logging:
#      driver: "json-file"
#      options:
#        max-size: "200k"
#        max-file: "10" 
#
#NGINX_WEB_LOG_MAX_SIZE=4m
#NGINX_WEB_LOG_MAX_FILE=10

#NGINX_GEN_LOG_MAX_SIZE=2m
#NGINX_GEN_LOG_MAX_FILE=10

#NGINX_LETSENCRYPT_LOG_MAX_SIZE=2m
#NGINX_LETSENCRYPT_LOG_MAX_FILE=10
it default . What has to be fixed in .env file?
Awatar użytkownika
fracz
Posty: 2256
Rejestracja: pt paź 28, 2016 10:56 pm
Lokalizacja: Kraków

The warnings you receive in supla-cloud logs are not problematic. The app should work as expected. As you can see, "success: apache entered RUNNING state".

If you can't reach the application, the problem might be with the proxy or domain name itself. Try inspecting the logs of nginx-letsencrypt and nginx-web containers.
mzw
Posty: 25
Rejestracja: wt wrz 05, 2017 6:50 am

Próbowałem zainstalować wszystko wg instrukcji i niestety kontener suplascripts się nie uruchamia.
Pokazuje błędy jak poniżej.

Kod: Zaznacz cały

 / __| | | | _ \ |    /_\
 \__ \ |_| |  _/ |__ / _ \
 |___/\___/|_| |____/_/ \_\
 / __| __ _ _(_)_ __| |_ ___
 \__ \/ _| '_| | '_ \  _(_-<
 |___/\__|_| |_| .__/\__/__/
               |_| by @fracz
                      v2.8.0

The encryption key already exists. No changes made.
Cache has been cleared successfully
mysqldump: Error: 'Access denied for user 'suplascripts'@'%' (using password: YES)' when trying to dump tablespaces
Could not make the database backup.
Phinx by Rob Morgan - https://phinx.org. 0.8.1

using config file ./backend/database/phinx-config.php
using config parser php
using migration paths 
 - /var/www/backend/database/migrations
using seed paths 
warning no environment specified, defaulting to: db
using adapter mysql
using database suplascripts

                                                                               
  [InvalidArgumentException]                                                   
  There was a problem connecting to the database: SQLSTATE[HY000] [2054] The   
  server requested authentication method unknown to the client                 
                                                                               

migrate [-c|--configuration CONFIGURATION] [-p|--parser PARSER] [-e|--environment ENVIRONMENT] [-t|--target TARGET] [-d|--date DATE]
Zmieniłem w docker-compose.base.yml

suplascripts-db:
container_name: ${COMPOSE_PROJECT_NAME}-db
restart: unless-stopped
image: mysql

na

suplascripts-db:
container_name: ${COMPOSE_PROJECT_NAME}-db
restart: unless-stopped
image: mysql:5.7.20

czyli na wersję mysql z której aktualnie korzysta supla-cloud i wszystko się uruchomiło.
Wygląda na to jakby suplascripts nie współpracowało z nowym obrazem mysql.
Komar000
Posty: 31
Rejestracja: pn lut 12, 2018 9:28 am

Nie wiem czy nie powinienem tego pisać w oddzielnym temacie, ale sprawa jest mocno powiązania z tym - kilka usług, jeden port :).

Udało mi się postawić cloud'a i scripts na VPS korzystając z Waszych porad. Teraz przyszedł czas na dołożenie jakiegoś clouda. Pomysł padł na owncloud. Nie wiem jak zabrać się za skofigurowanie kolejnej usługi będącej na porcie 443, żeby można było do clouda dostać się przez domenę. Robił może ktoś coś takiego? Głównie chodzi mi o wskazówki dotyczące przekierowania portów w nginx, albo podrzucenie innego rozwiązania. Owncloud byłby instalowany z kontenerów docker.

Finalnie wszystko będzie przeniesione z VPS na domowy serwer - bo koszty za prąd będą mniejsze od najtańszego VPS'a - chmura plików wtedy nabierze sensu i pojemności ;).
T0MEK77
Posty: 8
Rejestracja: wt sie 18, 2020 9:48 am

Mam pytanko
Postawiłem na Docker Desktop for Windows:

Kod: Zaznacz cały

INER ID        IMAGE                                    COMMAND                  CREATED             STATUS              PORTS                                      NAMES
fa909d511583        suplascripts_suplascripts                "docker-php-entrypoi…"   11 hours ago        Up About an hour    80/tcp                                     suplascripts
a5b413ecaf75        mysql:5.7                                "docker-entrypoint.s…"   11 hours ago        Up About an hour    3306/tcp, 33060/tcp                        suplascripts-db
55082b99640f        supla/supla-server                       "/usr/bin/server-ent…"   12 hours ago        Up About an hour    0.0.0.0:2015-2016->2015-2016/tcp           supla-server
548c1be225d0        supla/supla-cloud                        "docker-php-entrypoi…"   12 hours ago        Up About an hour    80/tcp                                     supla-cloud
6a17c056a1f1        mysql:5.7.20                             "docker-entrypoint.s…"   12 hours ago        Up About an hour    3306/tcp                                   supla-db
173a0e282979        jwilder/docker-gen                       "/usr/local/bin/dock…"   12 hours ago        Up About an hour                                               nginx-gen
f35734d9d311        nginx                                    "/docker-entrypoint.…"   12 hours ago        Up About an hour    0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp   nginx-web
c473115d7711        jrcs/letsencrypt-nginx-proxy-companion   "/bin/bash /app/entr…"   12 hours ago        Up About an hour                                               nginx-letsencrypt
Wygenerowałem certyfikaty, oba serwisy działają (supla-cloud i suplascript) www https są z certyfikatami na zielono. Na supla-cloud wygenerowałem token żeby zalogować się do suplascript ale mam problem z tokenem (Invalid token (SUPLA Cloud https://xxxxx.ddns.net does not authorize it).
Jak wpisze token wygenerowany na stronie https://cloud.supla.org to działa.

Proszę o poradę co mam źle.
T0MEK77
Posty: 8
Rejestracja: wt sie 18, 2020 9:48 am

Problem rozwiązany:
A w pliku docker-compose.base.yml dodałem nazwę domeny Cloud z adresem wewnętrznym pc z dockerem.

Kod: Zaznacz cały

version: '3'

services:
  suplascripts:
    extra_hosts:
      - "mojadomena.pl:192.168.0.2"
ODPOWIEDZ

Wróć do „supla-docker”