summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Morris <kevr@0cost.org>2020-12-24 01:11:40 +0100
committerLukas Fleischer <lfleischer@archlinux.org>2021-02-20 17:58:49 +0100
commit56472ed91a10189e23a3bf66ba18946e205ed57a (patch)
tree341793f5d16a25ab7aa4c736fe27404125b1356b
parent3ecee639ac5332978647572028339f06658f2beb (diff)
downloadaur-56472ed91a10189e23a3bf66ba18946e205ed57a.tar.gz
aur-56472ed91a10189e23a3bf66ba18946e205ed57a.tar.xz
add Dockerfile
This docker file downloads deps, sets up some things beforehand and finishes with running our entire collection of tests. Signed-off-by: Kevin Morris <kevr@0cost.org> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
-rw-r--r--Dockerfile30
1 files changed, 30 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 00000000..7e981340
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,30 @@
+FROM archlinux
+COPY . /aurweb
+WORKDIR /aurweb
+
+# Install dependencies.
+RUN pacman -Syu --noconfirm base-devel git gpgme protobuf pyalpm \
+ python-mysql-connector python-pygit2 python-srcinfo python-bleach \
+ python-markdown python-sqlalchemy python-alembic python-pytest \
+ python-werkzeug python-pytest-tap python-fastapi nginx python-authlib \
+ python-itsdangerous python-httpx python-jinja python-pytest-cov \
+ python-requests python-aiofiles python-python-multipart \
+ python-pytest-asyncio python-coverage hypercorn
+
+# Remove aurweb.sqlite3 if it was copied over via COPY.
+RUN rm -fv aurweb.sqlite3
+
+# Setup our test config.
+RUN sed -r "s;YOUR_AUR_ROOT;/aurweb;g" conf/config.dev > conf/config
+
+# Install translations.
+RUN AUR_CONFIG=conf/config make -C po all install
+
+# Initialize the database.
+RUN AUR_CONFIG=conf/config python -m aurweb.initdb
+
+# Test everything!
+RUN make -C test
+
+# Produce a coverage report.
+RUN coverage report --include='aurweb/*'