Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(docs): running on docker #161

Merged
merged 2 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading