Giter Site home page Giter Site logo

evertramos / docker-portainer-letsencrypt Goto Github PK

View Code? Open in Web Editor NEW
183.0 10.0 52.0 14 KB

Portainer docker container over SSL Certificate using Let's Encrypt automated by our webproxy docker-compose-letsencrypt-nginx-proxy

License: GNU Lesser General Public License v3.0

Shell 100.00%
docker docker-compose letsencrypt portainer docker-proxy

docker-portainer-letsencrypt's Introduction

Hi there ๐Ÿ‘‹

  • ๐Ÿ”ญ Iโ€™m currently working on server hosting automation
  • โ˜๏ธ Creating cloud infrastructure in Kubernteres

docker-portainer-letsencrypt's People

Contributors

codespearhead avatar evertramos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-portainer-letsencrypt's Issues

bug: error upon reading and writing env file via start.sh on MacOS

Description

Special characters in env vars will throw errors upon being read depending on the shell. The cross-platform solution is described here.

A similar problem happens in the following line, which won't work on MacOS, for the reason described here.

sed -i '/ENCRYPTED_PASSWORD/d' ./.env

I confirm that the version in this branch works in both MacOS and Linux if #12 is merged first, because the problem reported there will crash the program before it hits the troublesome line reported here.

Steps to Reproduce

./start.sh

Expected Behavior

No errors.

Current Behavior

WARN[0000] The "..." variable is not set. Defaulting to a blank string.
sed: 1: "./.env": invalid command code .

PORTAINER_SSL_PATH in .env.sample

A comment to PORTAINER_SSL_PATH variable in .env.sample states:

Path to the certificates
If you use our webproxy should be:
/home/user/webproxy/data/certs

is /home/user/webproxy/data/certs some kind of hardcoded path that docker-gen that starts with docker-compose-letsencrypt-nginx-proxy-companion uses and dynamically passed certs there to be consumed by app's container? is user part should be substituted by current user who runs the docker-compose-letsencrypt-nginx-proxy-companion or is it a generic string "user"?

Could you please elaborate more on this env var and it's correct configuration approach.
Thank you.

Portainer goes down when using Docker API

Error description:

So, i connected to my docker env using TLS config Domain:Port (not IP, i used domain because IP is dynamic)
As example i will use "example.com:1234"
After i add a container ("nginx:alpine in my case) which points to my domain ("example.com"), the Portainer endpoint is no more accesible, is down.

Steps to reproduce

Connect to a docker machine using Docker API using Domain:Port.
Add nginx container which points to used domain and deploy it.
Refresh portainer

Expected result

Portained endpoints will be accesible in order to show all my running images, volumesc, etc

Error result

Portainer endpoint is "down"

Comments

Portainer not running

Noob in training with docker:
Docker VPS on Digital Ocean
did follow instructions on docker-compose-letsencrypt-nginx-proxy-companion then run
./test_start_ssl.sh mydomain, www.mydomain
./test_start_ssl.sh portainer.mydomain
./stop_test
followed instructions on docker-portainer-letsencrypt but when I go to portainer.mydomain i get "ERR_NAME_NOT_RESOLVED"
I have a cert named portainer.mydomain on certs folder and I did point to that on .env file
If I read the logs I see

ACME server returned an error: urn:acme:error:rateLimited :: There were too many requests of a given type :: Error creating new authz :: too many failed authorizations recently: see https://letsencrypt.org/docs/rate-limits/

what am I doing wrong?

502: Bad Gateway | No Live Upstream

updated mattermost container to latest version, now i get the error 502: Bad Gateway.
Proxy Logfile says: "no live upstreams while connecting to upstream"

Docker Container is running and connected to Proxy network. If i call container direct with port i got a connection.

So any suggestion where to look for this error?

ERR_TOO_MANY_REDIRECTS

I am using your docker-compose-letsencrypt-nginx-proxy-companion together with this portioner project. When it is running and start the website (https://portianer.xx.yy) I do get the ERR_TOO_MANY_REDIRECTS error in Chrome. In safari I get a similar message regarding the high amount of redirects.

server {
server_name portainer.xxx.yy;
listen 80 ;
access_log /var/log/nginx/access.log vhost;
return 301 https://$host$request_uri;
}
server {
server_name portainer.xxx.yy;
listen 443 ssl http2 ;
access_log /var/log/nginx/access.log vhost;

add_header Strict-Transport-Security "max-age=31536000" always;
include /etc/nginx/vhost.d/default;
location / {
	proxy_pass http://portainer.xxx.yy;
}

}

This looks like the https:// request gets redirected to the http:// side, and this returns back to https://

Create docker container with exposed port using portainer

I am looking at using this to manage my docker containers, but I've found that it's not possible to add exposed ports without creating your own image (and thus exposing ports via the docker file) in portainer.

Can you confirm that the only way to use portainer with the nginx-gen setup is to modify dockerfiles? (Or use images which already expose their ports)

About ssl certificates

I guess this is probably just a naive doubt.

But I have generated some certificates using certbot in order to use with nginx.

I wonder if they can be used to make portainer available with https.

these are the files it generated, however from portainer documentation, they are using crt and key files, not pem.

README  cert.pem  chain.pem  fullchain.pem  privkey.pem

Should I use theses keys he generated and do some conversion?
Should I generate it differently using certbot?

Portainer not able to use docker-compose file v3

Thank you very much for your docker repos with reverse proxy. They are awesome!

I have started using docker not long ago so this could potential be a silly question. Sadly i encountered a misbehaviour in my installation and wanted to ask for assistance:

I am not able to start docker-compose files greater v2. Portainer says "Only Compose file format version 2 is supported at the moment." The official portainer demo does allow me to use v3 as stated in the git.

I used your script and have version 1.19.1 of portainer installed successfully. Engine 18.06.1-ce is used with API v1.38 via a local socket connection.

Could you point me into the right direction how to resolve my problem?

Thank you very much and best regards.

Sorry...

... this hurted my eye :

docker-compose-with-passowrd.yml

Thanks for the nice jwilder / companion examples ;-)

bug: network.external.name is deprecated

Description

Running either Docker Compose file will warn network.external.name is deprecated.

Steps to Reproduce

docker compose up -f docker-compose-with-password.yml
docker compose up -f docker-compose.yml

Expected Behavior

No errors.

Current Behavior

WARN[0000] network default: network.external.name is deprecated. Please set network.name with external: true 
service "portainer" refers to undefined volume portainer_data: invalid compose project

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.