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

add docker build and helm chart #921

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
33 changes: 33 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM ubuntu:24.04
LABEL maintainer="Klavs Klavsen <[email protected]>"

WORKDIR /tmp
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y \
python3-pip \
python3-venv \
build-essential \
postgresql-server-dev-all

RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install git gettext-base curl -y
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
RUN apt-get update; DEBIAN_FRONTEND=noninteractive apt-get install -y nodejs

WORKDIR /var/www
RUN python3 -m venv relate-venv
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y python3-poetry


RUN git clone https://github.com/inducer/relate.git
ENV VENV_PATH=/var/www/relate-venv
WORKDIR /var/www/relate
RUN git pull
RUN poetry install
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
RUN poetry install
RUN poetry install -E postgres -E memcache

Copy link
Owner

Choose a reason for hiding this comment

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

On that note, memcached can be helpful (though it is not required).

RUN npm install ; npm run build
Copy link
Owner

Choose a reason for hiding this comment

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

See update.sh in the project root for a concise way to run all required steps.

RUN poetry run pip install psycopg2
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
RUN poetry run pip install psycopg2

COPY local_settings_template.py /var/www/relate/local_settings_template.py
COPY run-relate.sh /run-relate.sh
RUN chmod 755 /run-relate.sh

CMD ["/run-relate.sh"]
25 changes: 25 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: '3'

services:
app:
image: relate:latest
restart: unless-stopped
command: /run-relate.sh
environment:
DBHOST: db
DBUSER: postgres
DBPASS: LocalPassword
ports:
- 8000:8000
links:
- db

db:
image: postgres
restart: unless-stopped
ports:
- 5432:5432
environment:
POSTGRES_PASSWORD: LocalPassword
POSTGRES_DB: relate

Loading
Loading