1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-08-06 14:05:21 +02:00

feature/additional-db (#371)

* add support for setting db_url

* fix tests

* add db_username/password env variables

* init db if super user doesn't exist

* fix tests

* fix tests

* set SQLite default DB_URL

* don't run tests on draft PRs

* add lint/black tests

* add test-all

* spell check settings

* black/flake8

* check format fail

* new badges

* rename workflow

* fix formatting

* remove white-space

* test connection arguments for pg

* format

* add new values to template

* format

* remove old script

* monkeypatch test db

* working docker-compose for postgres

* update docs

* test pg workflow

* format

* add driver

* install w/ poetry

* setup container

* change image

* set database to localhost

* update tests

* set url

* fix url path

* disable cache

* database init

* bust cache

* get by name

Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
Hayden 2021-05-01 13:35:57 -08:00 committed by GitHub
parent 52e5e9da5d
commit c196445e61
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
33 changed files with 257 additions and 195 deletions

View file

@ -16,14 +16,11 @@ ENV POETRY_VERSION 1.1.6
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc g++ \
curl \
python3-dev \
build-essential \
libssl-dev \
libffi-dev \
gnupg gnupg2 gnupg1 \
apt-transport-https \
debian-archive-keyring \
debian-keyring \
libpq-dev \
libwebp-dev \
&& curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | apt-key add - \
&& curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | tee -a /etc/apt/sources.list.d/caddy-stable.list \
@ -35,12 +32,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
RUN pip install --no-cache-dir "poetry==$POETRY_VERSION"
RUN pip install --no-cache-dir "psycopg2-binary==2.8.6"
#! Future
# pip install --no-cache-dir "psycopg2-binary==2.8.6"
# project dependencies
WORKDIR /app
COPY pyproject.toml /app/
COPY pyproject.toml poetry.lock /app/
RUN poetry config virtualenvs.create false
RUN poetry install --no-dev --no-interaction --no-ansi
COPY ./mealie /app/mealie
RUN poetry config virtualenvs.create false \
&& poetry install --no-dev
@ -48,7 +47,6 @@ RUN poetry config virtualenvs.create false \
#! Future
# COPY ./alembic /app
# COPY alembic.ini /app
COPY ./Caddyfile /app
COPY ./dev/data/templates /app/data/templates
@ -59,4 +57,4 @@ VOLUME [ "/app/data/" ]
EXPOSE 80
CMD /app/mealie/run.sh
CMD /app/mealie/run.sh