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 1 commit 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
32 changes: 32 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM ubuntu:20.04
MAINTAINER Klavs Klavsen <[email protected]>

WORKDIR /tmp

RUN apt-get update && \
apt-get install -y \
python3-pip \
python3.8-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 pip install 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
RUN npm install ; npm run build
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']
20 changes: 20 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: '3'

services:
app:
image: relate:latest
command: /run-relate.sh
environment:
DBHOST: db
DBUSER: myuser
DBPASS: mypass
links:
- db

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