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

Reorg 2024 08 19 #23

Merged
merged 4 commits into from
Aug 19, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Install postgresql
uses: tj-actions/install-postgresql@v3
with:
postgresql-version: 11
postgresql-version: 12
- uses: actions/checkout@v3
- name: Include ppa repository
run: sudo add-apt-repository ppa:deadsnakes/ppa
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile.develop.${{ matrix.dockerfile-suffix }}
file: ./tests/dockerfiles/Dockerfile.${{ matrix.dockerfile-suffix }}
push: false
load: true
tags: test:latest
Expand Down
43 changes: 43 additions & 0 deletions Dockerfile.develop
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
FROM registry.altlinux.org/alt/base:p10

RUN apt-get update && apt-get install -y \
python3-module-async-timeout \
python3-module-asyncpg \
python3-module-cachetools \
python3-module-jinja2 \
python3-module-pip \
python3-module-psycopg2 \
python3-module-requests \
python3-module-starlette \
python3-module-uvicorn \
&& find /var/lib/apt/lists/ -type f -delete

RUN apt-get update && apt-get install -y \
gcc make \
git \
postgresql15-server \
python3-modules-sqlite3 \
&& find /var/lib/apt/lists/ -type f -delete

RUN git clone https://github.com/eradman/ephemeralpg.git \
&& cd ephemeralpg \
&& make && make install \
&& cd .. \
&& rm -rf ephemeralpg/

RUN python3 -m pip install wdb

ENV PATH="/usr/lib/postgresql/15/bin:${PATH}"
# take out coverage report from source directory
ENV COVERAGE_FILE="/tmp/qllr.coverage"

COPY --chown=apache . /opt/qllr

WORKDIR /opt/qllr

RUN python3 -m pip install --no-deps -r requirements.txt
RUN python3 -m pip install -r requirements_dev.txt

USER apache

CMD ["sh", "-c", "./docker/entrypoint.py && ./main.py"]
30 changes: 14 additions & 16 deletions Dockerfile.production
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
FROM debian:buster
FROM registry.altlinux.org/alt/base:p10

RUN apt-get update && apt-get install -y \
python3-asgiref \
python3-click \
python3-cachetools \
python3-h11 \
python3-jinja2 \
python3-idna \
python3-pip \
python3-psycopg2 \
python3-requests \
python3-sniffio \
python3-typing-extensions \
&& rm -rf /var/lib/apt/lists/*
python3-module-async-timeout \
python3-module-asyncpg \
python3-module-cachetools \
python3-module-jinja2 \
python3-module-pip \
python3-module-psycopg2 \
python3-module-requests \
python3-module-starlette \
python3-module-uvicorn \
&& find /var/lib/apt/lists/ -type f -delete

COPY --chown=www-data . /opt/qllr
COPY --chown=apache . /opt/qllr

WORKDIR /opt/qllr

RUN python3 -m pip install -r requirements.txt
RUN python3 -m pip install --no-deps -r requirements.txt

USER www-data
USER apache

CMD ["sh", "-c", "./docker/entrypoint.py && ./main.py"]
14 changes: 13 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,20 @@ services:
dev:
build:
context: .
dockerfile: Dockerfile.develop.buster
dockerfile: Dockerfile.develop
volumes:
- .:/opt/qllr
ports:
- "127.0.0.1:7081:8000"
environment:
- DATABASE_URL=postgres://eugene:bebebe@db:5432/qllr
- HOST=0.0.0.0
- PORT=8000
- WDB_SOCKET_SERVER=wdb
- WDB_NO_BROWSER_AUTO_OPEN=True
depends_on: ["wdb", "db"]

wdb:
image: kozea/wdb:3.3.0
ports:
- "127.0.0.1:1984:1984"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading