-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
Hi, when I try to enter to my web app through HTTP appears this:
How can I configure my docker-compose.yml to redirect HTTP to HTTPS?
My current docker-compose.yml is the following:
version: '3'
services:
app:
container_name: app
depends_on:
- mongo
image: myapp-web
restart: on-failure
build:
context: .
dockerfile: dockerfile
env_file: docker.env
networks:
- farefo-net
ssl-proxy:
container_name: ssl-proxy
image: justsml/ssl-proxy:latest
environment:
- HTTPS_PORT=443
- SERVER_NAME=myapp.com
- UPSTREAM_TARGET=app:3000
- CERT_PUBLIC_PATH=/certs/fullchain.pem
- CERT_PRIVATE_PATH=/certs/privkey.pem
volumes:
- /certs:/certs:ro
ports:
- 443:443
- 80:443
networks:
- farefo-net
mongo:
container_name: mongo
command:
- --storageEngine=wiredTiger
image: mongo:4.2.5-bionic
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: username
MONGO_INITDB_ROOT_PASSWORD: password
volumes:
- $PWD/data:/data/db
- $PWD/database:/opt/database
networks:
- farefo-net
networks:
farefo-net:
Metadata
Metadata
Assignees
Labels
No labels
