Skip to content

Commit

Permalink
Fix up build infrastructure for pq.
Browse files Browse the repository at this point in the history
  • Loading branch information
ktlim committed May 13, 2024
1 parent 5901a36 commit 4283eb9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,10 @@ jobs:
image: ${{ github.repository }}-hinfo
github_token: ${{ secrets.GITHUB_TOKEN }}
dockerfile: Dockerfile.hinfo

- name: Build pqserver
uses: lsst-sqre/build-and-push-to-ghcr@v1
with:
image: ${{ github.repository }}-pq
github_token: ${{ secrets.GITHUB_TOKEN }}
dockerfile: Dockerfile.pqserver
14 changes: 9 additions & 5 deletions Dockerfile.pqserver
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
FROM python:3.11
RUN pip install flask gunicorn sqlalchemy
WORKDIR /consdb-server
COPY src/server.py /consdb-server/
RUN pip install flask gunicorn sqlalchemy psycopg2
WORKDIR /consdb-pq
COPY python/lsst/consdb/pqserver.py python/lsst/consdb/utils.py /consdb-pq/
# Environment variables that must be set:
# POSTGRES_URL
ENTRYPOINT [ "gunicorn", "-b", "0.0.0.0:8000", "-w", "2", "server:app" ]
# DB_HOST DB_PASS DB_USER DB_NAME or POSTGRES_URL

# Expose the port.
EXPOSE 8080

ENTRYPOINT [ "gunicorn", "-b", "0.0.0.0:8080", "-w", "2", "pqserver:app" ]

0 comments on commit 4283eb9

Please sign in to comment.