simulacrum icon indicating copy to clipboard operation
simulacrum copied to clipboard

Dockerize the auth0-simulator

Open dagda1 opened this issue 3 years ago • 2 comments
trafficstars

Having to install the auth0-simulator as a dev dependency is something we should try and avoid.

Creating a downloadable docker image that we could run something like this would make things a lot easier.

docker run -i --rm --security-opt seccomp=$HOME/chrome.json \
    -v myvol:/app \
    --name auth0-simulator \
    frontside/auth-simulator:latest

We could try something like this to make ssl configuration easier.

dagda1 avatar Feb 03 '22 13:02 dagda1

What does the user story look like for getting setup with SSL and a complete simulator?

cowboyd avatar Feb 04 '22 12:02 cowboyd

@cowboyd I linked to something I would like to spike in the above issue

https://dev.to/istarkov/fast-and-easy-way-to-setup-web-developer-certificates-450e

TLDR;

  • Register a DNS A record somewhere, something like A auth0-simulator.com 127.0.0.1
  • Use certbot to download the certs from letsencrypt
  • Point to these certs in https.ts rather than the mkcert certs.
      let ssl: SSLOptions = {
        key: fs.readFileSync(
          paths.ssl.keyFile
        ),
        cert: fs.readFileSync(paths.ssl.pemFile),
      } as const;

I think we need some way of being able to configure the certs and by either defaulting to mkcert or letsencrypt certs.

dagda1 avatar Feb 06 '22 23:02 dagda1