-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
2,626 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Referenced from: | ||
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "pip" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
time: "00:00" | ||
timezone: "Europe/London" | ||
open-pull-requests-limit: 5 | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
FROM python:3.12-slim | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get update && \ | ||
apt-get install -q -y --no-install-recommends \ | ||
apt-utils \ | ||
ca-certificates \ | ||
git \ | ||
locales \ | ||
unattended-upgrades && \ | ||
unattended-upgrade -v && \ | ||
locale-gen en_GB en_GB.UTF-8 && \ | ||
localedef -i en_GB -c -f UTF-8 -A /usr/share/locale/locale.alias en_GB.UTF-8 && \ | ||
apt-get remove -q -y unattended-upgrades && \ | ||
apt-get autoremove -q -y && \ | ||
apt-get clean -q -y && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
ENV LANG=en_GB.UTF-8 \ | ||
LANGUAGE=en_GB \ | ||
LC_ALL=en_GB.UTF-8 \ | ||
TZ=/Etc/UTC | ||
|
||
WORKDIR /app | ||
|
||
ARG APP_USER=appuser | ||
ARG APP_UID=1000 | ||
ARG APP_GID=$APP_UID | ||
|
||
RUN groupadd --gid $APP_GID $APP_USER && \ | ||
useradd --uid $APP_UID --gid $APP_GID --shell /bin/bash --create-home $APP_USER | ||
|
||
ARG POETRY_VERSION="1.8.3" | ||
|
||
ENV POETRY_NO_INTERACTION=1 \ | ||
POETRY_VIRTUALENVS_CREATE=false \ | ||
POETRY_CACHE_DIR=/app/.poetry | ||
|
||
RUN python -m venv /app/venv && \ | ||
. /app/venv/bin/activate && \ | ||
pip install --no-cache-dir "poetry==$POETRY_VERSION" | ||
|
||
COPY pyproject.toml poetry.lock /app/ | ||
|
||
RUN . /app/venv/bin/activate && \ | ||
poetry install --no-root | ||
|
||
COPY . /app | ||
|
||
RUN . /app/venv/bin/activate && \ | ||
poetry install && \ | ||
rm -rf "$POETRY_CACHE_DIR" | ||
|
||
RUN chown -R $APP_USER:$APP_USER /app | ||
|
||
USER $APP_USER | ||
|
||
ENTRYPOINT ["/app/docker/entrypoint.sh"] | ||
|
||
CMD ["/bin/bash", "-c", "sleep infinity"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
services: | ||
mysql-server: | ||
image: mysql:8.0 | ||
restart: always | ||
ports: | ||
- "127.0.0.1:3306:3306" | ||
environment: | ||
MYSQL_USER: "test" | ||
MYSQL_PASSWORD: "test" | ||
MYSQL_DATABASE: "study_notify" | ||
MYSQL_RANDOM_ROOT_PASSWORD: "true" | ||
healthcheck: | ||
test: mysqladmin ping | ||
interval: 10s | ||
timeout: 5s | ||
retries: 10 | ||
|
||
porch-server: | ||
image: "ghcr.io/wtsi-npg/python-3.10-npg-porch-2.0.0" | ||
restart: always | ||
ports: | ||
- "127.0.0.1:8081:8081" | ||
healthcheck: | ||
test: curl -f http://localhost:8081 | ||
interval: 10s | ||
timeout: 5s | ||
retries: 10 | ||
|
||
app: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile.dev | ||
restart: always | ||
depends_on: | ||
mysql-server: | ||
condition: service_healthy | ||
porch-server: | ||
condition: service_healthy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
set -eo pipefail | ||
|
||
# This virtualenv is created by the Dockerfile | ||
source /app/venv/bin/activate | ||
|
||
exec "$@" |
Oops, something went wrong.