From 003a05f011ba2c136e34c92c412ba1d8de277fcd Mon Sep 17 00:00:00 2001 From: Marluan Espiritusanto Date: Wed, 10 Jan 2024 19:59:04 +0100 Subject: [PATCH 1/2] refactor(env): removing unsed variable --- .env.example | 1 - env.d.ts | 1 - 2 files changed, 2 deletions(-) diff --git a/.env.example b/.env.example index e5e17113..547a9ec0 100644 --- a/.env.example +++ b/.env.example @@ -12,7 +12,6 @@ CEDULA_TOKEN_API= CITIZENS_API_AUTH_KEY= NEXT_PUBLIC_ORY_SDK_URL= ORY_SDK_TOKEN= -PWNED_KEY= LIVENESS_CONFIDENCE_THRESHOLD=85 LIVENESS_SIMILARITY_THRESHOLD=95 NEXT_PUBLIC_SENTRY_DSN= diff --git a/env.d.ts b/env.d.ts index 8b3b1d98..13f6ee86 100644 --- a/env.d.ts +++ b/env.d.ts @@ -14,7 +14,6 @@ namespace NodeJS { CITIZENS_API_AUTH_KEY?: string; NEXT_PUBLIC_ORY_SDK_URL?: string; ORY_SDK_TOKEN?: string; - PWNED_KEY?: string; LIVENESS_CONFIDENCE_THRESHOLD?: number; LIVENESS_SIMILARITY_THRESHOLD?: number; NEXT_PUBLIC_SENTRY_DSN?: string; From 43b76a12adf51ae1fef999a9a0c32818c038523c Mon Sep 17 00:00:00 2001 From: Marluan Espiritusanto Date: Wed, 10 Jan 2024 19:59:31 +0100 Subject: [PATCH 2/2] docs(docker): running on docker docs --- docs/README.md | 5 +++++ docs/docker/how-to-run-on-docker.md | 31 +++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 docs/README.md create mode 100644 docs/docker/how-to-run-on-docker.md diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 00000000..e7359e0f --- /dev/null +++ b/docs/README.md @@ -0,0 +1,5 @@ +# Cuenta Única Ciudadana + +## Documentation + +- [Run on docker](./docker/how-to-run-on-docker.md) diff --git a/docs/docker/how-to-run-on-docker.md b/docs/docker/how-to-run-on-docker.md new file mode 100644 index 00000000..6b165697 --- /dev/null +++ b/docs/docker/how-to-run-on-docker.md @@ -0,0 +1,31 @@ +# How to run on Docker + +If you're trying to run this project on a local machine with Docker, follow this steps. + +## Load all the environment variables from the .env file + +```sh +export $(grep -v '^#' .env | xargs) +``` + +## Build the image + +```sh +docker build \ + --secret id=AWS_EXPORTS_JSON,src=$AWS_EXPORTS_PATH \ + --build-arg SENTRY_ORG=$SENTRY_ORG \ + --build-arg SENTRY_PROJECT=$SENTRY_PROJECT \ + --build-arg SENTRY_AUTH_TOKEN=$SENTRY_AUTH_TOKEN \ + --build-arg NEXT_PUBLIC_SENTRY_DSN=$NEXT_PUBLIC_SENTRY_DSN \ + --build-arg NEXT_PUBLIC_RECAPTCHA_SITE_KEY=$NEXT_PUBLIC_RECAPTCHA_SITE_KEY \ + -t $IMAGE_NAME . +``` + +## Run the image + +```sh +docker run \ + --env-file=./.env \ + -p 3000:3000 \ + $IMAGE_NAME +```