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

build: add ssl certs for db connections #191

Closed
wants to merge 1 commit into from
Closed
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
3 changes: 2 additions & 1 deletion apps/web/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ FROM base AS builder
ENV NEXT_TELEMETRY_DISABLED=1
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine
# to understand why libc6-compat might be needed.
RUN apk update
RUN apk add --no-cache libc6-compat
# Set working directory
COPY . /app
Expand Down Expand Up @@ -45,6 +44,8 @@ RUN turbo run build --filter=cuiloa-app

# Run container
FROM alpine AS runner
# Ensure that SSL certs are present for DB connections
RUN apk add --no-cache ca-certificates
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

L48 contains the resolution, permitting SSL-required db connections in the runtime image.

WORKDIR /app

# Disable telemetry.
Expand Down
7 changes: 6 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,13 @@ pgtyped-cli:
update-cometbft-schema:
curl -o deploy/postgres-cometbft-schema.sql -sSf "https://raw.githubusercontent.com/cometbft/cometbft/v0.37.2/state/indexer/sink/psql/schema.sql"

# Build the webapp container image
container:
podman build -t ghcr.io/penumbra-zone/cuiloa .
podman build -t ghcr.io/penumbra-zone/cuiloa -f apps/web/Containerfile .

# Build, then run the webapp container image. Uses local env vars.
run-container:
podman run -e DATABASE_URL -e APP_URL -e PENUMBRA_GRPC_ENDPOINT -p 3000:3000 -it ghcr.io/penumbra-zone/cuiloa
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These just targets are included strictly for my own sake when testing the app locally.


compose:
docker compose up
Expand Down
Loading