Skip to content
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
4 changes: 2 additions & 2 deletions apps/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ ENV STORAGE_DIR=/app/storage

RUN mkdir -p /app/storage && chown node:node /app/storage

# Standalone output does not include public/ or static/; both are required for
# the UI (design CSS, fonts, emblem) and must be copied explicitly.
# Standalone output does not include public/ or .next/static; the UI needs both
# (client bundles, stylesheets, images), so they are copied explicitly.
COPY --from=build --chown=node:node /repo/apps/api/.next/standalone/ ./
COPY --from=build --chown=node:node /repo/apps/api/.next/static ./apps/api/.next/static
COPY --from=build --chown=node:node /repo/apps/api/public ./apps/api/public
Expand Down
9 changes: 6 additions & 3 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ services:
POSTGRES_USER: refined
POSTGRES_PASSWORD: refined
POSTGRES_DB: refined
# Override the host ports with DB_PORT / API_PORT when they are taken.
ports:
- "127.0.0.1:5432:5432"
- "127.0.0.1:${DB_PORT:-5432}:5432"
volumes:
- gov-portal-pgdata:/var/lib/postgresql/data
healthcheck:
Expand All @@ -28,15 +29,17 @@ services:
DATABASE_URL: postgres://refined:refined@db:5432/refined
STORAGE_DIR: /app/storage
ports:
- "127.0.0.1:3000:3000"
- "127.0.0.1:${API_PORT:-3000}:3000"
volumes:
- gov-portal-avatars:/app/storage
depends_on:
migrate:
condition: service_completed_successfully

# Gate API startup on a successful schema migration. This is safe to rerun:
# Drizzle records applied migrations in the database.
# Drizzle records applied migrations in the database. The image also carries
# the repository scripts, so it runs one-off tasks too:
# docker compose run --rm migrate bun run db:init
migrate:
build:
context: .
Expand Down
Loading