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

Install postgres in Dockerfile for psycopg2 to build correctly #205

Merged
merged 6 commits into from
Feb 16, 2025
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
11 changes: 7 additions & 4 deletions Dockerfile-node
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,18 @@ SHELL ["/bin/bash", "-c"]

# install deps
RUN apt-get update
RUN apt-get install curl gcc curl git -y
RUN apt-get install gcc curl git libpq-dev -y

# add conda install to path; use base environment
ENV PATH="/opt/conda/bin:${PATH}"
RUN conda create -n node python=3.12
RUN conda create -y -n node python=3.12
RUN echo "source activate node" > /root/.bashrc
ENV PATH="/opt/conda/envs/node/bin:$PATH"
RUN echo

# install postgres (required for poetry to build psycopg2 from source)
RUN conda install -y conda-forge::postgresql=17.2
ENV LDFLAGS="-L/opt/conda/lib"
ENV CPPFLAGS="-I/opt/conda/include"

# set up poetry
ENV PATH="/root/.local/share/pypoetry/venv/bin/:${PATH}"
Expand All @@ -40,4 +44,3 @@ CMD set -x && \
((poetry run celery -A node.worker.main:app worker --loglevel=info | tee /dev/stdout) & ) && \
((poetry run python -m node.server.server --communication-protocol http --port 7001) &) && \
poetry run python -m node.server.server --communication-protocol ws --port 7002

10 changes: 7 additions & 3 deletions Dockerfile-node-dev
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,18 @@ SHELL ["/bin/bash", "-c"]

# install deps
RUN apt-get update
RUN apt-get install curl gcc curl git -y
RUN apt-get install gcc curl git libpq-dev -y

# add conda install to path; use base environment
ENV PATH="/opt/conda/bin:${PATH}"
RUN conda create -n node python=3.12
RUN conda create -y -n node python=3.12
RUN echo "source activate node" > /root/.bashrc
ENV PATH="/opt/conda/envs/node/bin:$PATH"
RUN echo

# install postgres (required for poetry to build psycopg2 from source)
RUN conda install -y conda-forge::postgresql=17.2
ENV LDFLAGS="-L/opt/conda/lib"
ENV CPPFLAGS="-I/opt/conda/include"

Copy link
Contributor

Choose a reason for hiding this comment

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

looks like LDFLAGS and CPPFLAGS are missing?

# set up poetry
ENV PATH="/root/.local/share/pypoetry/venv/bin/:${PATH}"
Expand Down
Loading