Skip to content
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
12 changes: 7 additions & 5 deletions sandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# syntax=docker/dockerfile:1.4

# First Stage: Build Proxy service
FROM python:3.13-alpine AS deps
FROM --platform=linux/x86_64 python:3.13-alpine AS deps

# Install poetry
RUN pip install poetry
Expand All @@ -8,7 +10,7 @@ RUN pip install poetry
COPY pyproject.toml poetry.lock ./
RUN poetry config virtualenvs.in-project true && poetry install --no-root

FROM deps AS runtime
FROM --platform=linux/x86_64 deps AS runtime

# Copy virtual env from python-deps stage
COPY --from=deps /.venv /.venv
Expand All @@ -23,17 +25,17 @@ USER appuser

# Install application into container
COPY app.py __init__.py /home/appuser/app/
COPY ./specification /home/appuser/app/specification
# Copy supervisord configuration
COPY supervisord.conf /etc/supervisord.conf

COPY ./specification /home/appuser/app/specification
# Install Prism
# Switch to root and install Prism & Supervisor
USER root
RUN apk add --no-cache nodejs npm && \
npm install --ignore-scripts -g @stoplight/prism-cli && \
apk add --no-cache supervisor

# Expose ports
# Expose port and start app
EXPOSE 9000
ENV UPSTREAM_HOST=http://localhost:5000
# Run supervisord
Expand Down
2 changes: 1 addition & 1 deletion sandbox/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ build-and-publish-sandbox-image:

deploy-sandbox-spec:
make -C .. construct-spec APIM_ENV=sandbox
proxygen instance deploy sandbox eligibility-signposting-api build/specification/sandbox/eligibility-signposting-api.yaml
proxygen instance deploy sandbox eligibility-signposting-api ../build/specification/sandbox/eligibility-signposting-api.yaml

up: build
docker compose -f docker-compose.yaml up -d
Expand Down
Loading