-
use the following command:
docker network create nginx-ssl-proxy
-
use the following command to start the service:
docker-compose up -d
-
create you app with docker-compose.yml file, eg:
version: '3' services: example-app: image: nginx:alpine expose: - 80 environment: VIRTUAL_HOST: example.com VIRTUAL_PORT: 80 LETSENCRYPT_HOST: example.com LETSENCRYPT_EMAIL: foo@example.com networks: default: external: name: nginx-ssl-proxy
-
visit example.com and wait a few seconds to see if example.com has
https
enabled.