I have set up with the following configuration: ``` version: '3' services: reproxy: restart: always image: umputun/reproxy:master container_name: reproxy hostname: reproxy ports: - "80:8080" - "443:8443" volumes: - /var/run/docker.sock:/var/run/docker.sock:ro environment: - TZ=UTC - DOCKER_ENABLED=true - DOCKER_AUTO=true - DEBUG=false - MGMT=false - SSL_TYPE=auto - SSL_ACME_FQDN=khanton.ru boti: restart: always image: ghcr.io/khanton/boti:master hostname: khanton.ru container_name: khanton.ru ports: - "8080:8080" volumes: - ./db:/app/db environment: - DB_PATH=db - PORT=8080 - HOST=0.0.0.0 - TOKEN=XXX - SERVER=https://khanton.ru labels: reproxy.server: '*' reproxy.route: '^/(.*)' reproxy.dest: '/@1' ``` It worked! However, after re-creating the container, https broke. ``` % curl -v -H "Content-Type: application/json" -d '{"msg": "Hello !"}' https://khanton.ru/api/v1/msg * Trying 95.217.13.45... * TCP_NODELAY set * Connected to khanton.ru (95.217.13.45) port 443 (#0) * ALPN, offering h2 * ALPN, offering http/1.1 * successfully set certificate verify locations: * CAfile: /etc/ssl/cert.pem CApath: none * TLSv1.2 (OUT), TLS handshake, Client hello (1): * Operation timed out after 300078 milliseconds with 0 out of 0 bytes received * Closing connection 0 curl: (28) Operation timed out after 300078 milliseconds with 0 out of 0 bytes received ``` reproxy log from container: ``` reproxy | 2021/07/19 18:52:01.579 [WARN] http: TLS handshake error from 185.197.33.7:55610: acme/autocert: missing certificate ```
Activity
umputun commentedon Jul 19, 2021
you should add persistent volume to keep your certificates. this is not related to reporxy but a part of the docker and docker compose
umputun commentedon Jul 19, 2021
just in case if it wasn't clear:
- ./var/ssl:/srv/var/sslto volumes section- SSL_ACME_LOCATION=/srv/var/sslto environment sectionumputun commentedon Jul 19, 2021
because this is not a bug report but rather a general question I'll move it to discussions