Skip to content

Commit

Permalink
feat(docs): running on docker (#161)
Browse files Browse the repository at this point in the history
* refactor(env): removing unsed variable

* docs(docker): running on docker docs
  • Loading branch information
marluanespiritusanto authored Jan 10, 2024
1 parent e5cab90 commit b9fbf9a
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 2 deletions.
1 change: 0 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
5 changes: 5 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Cuenta Única Ciudadana

## Documentation

- [Run on docker](./docker/how-to-run-on-docker.md)
31 changes: 31 additions & 0 deletions docs/docker/how-to-run-on-docker.md
Original file line number Diff line number Diff line change
@@ -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
```
1 change: 0 additions & 1 deletion env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b9fbf9a

Please sign in to comment.