I'm always excited to take on new projects and collaborate with innovative minds.
+855 12 282 686
samnangrosady9@gmail.com
Mimicking production environments with HTTPS setups ensures more accurate testing, reducing the likelihood of issues when deploying to live servers.

Local HTTPS portals enable developers to create secure connections within their development environments. By utilizing HTTPS, data transmitted between services remains encrypted, safeguarding sensitive information from potential security threats.
Imagine you have local services frontend and API running on ports 3000 and 3001, respectively. You want to set up a local HTTPS portal using Docker to secure these services. You want access https://api.local.test for the API and https://front.local.test for the frontend.
Â
docker-compose.yml file to define the services and their configurations.services:
frontend:
container_name: frontend
image: nginxdemos/hello
ports:
- "3000:80"
api:
container_name: api
image: nmatsui/hello-world-api
ports:
- "3001:3000"
https-portal:
image: steveltn/https-portal:1
ports:
- "80:80"
- "443:443"
restart: always
environment:
DOMAINS: 'api.local.test -> http://api:3001, front.local.test -> http://frontend:80'
volumes:
- https-portal-data:/var/lib/https-portal
volumes:
https-portal-data:
echo "127.0.0.1 local.test api.local.test" | sudo tee -a /etc/hosts
127.0.0.1 local.test
127.0.0.1 api.local.test
Run
docker compose up -d
🌟 Stay tuned 🌟
Full content:Dev.to