mirror of
https://github.com/gtsteffaniak/filebrowser.git
synced 2026-11-24 23:49:41 -05:00
23 lines
862 B
Docker
23 lines
862 B
Docker
FROM ghcr.io/gtsteffaniak/playwright-base:latest
|
|
WORKDIR /app
|
|
|
|
# Copy setup scripts first to leverage caching
|
|
COPY [ "./_docker/src/general/", "./" ]
|
|
|
|
WORKDIR /app/frontend
|
|
COPY [ "./_docker/src/general/frontend/", "./" ]
|
|
COPY [ "./frontend/tests/", "./tests" ]
|
|
|
|
WORKDIR /app/backend/
|
|
COPY [ "./backend/filebrowser", "./"]
|
|
COPY [ "./backend/reduce-rounded-corners.css", "./no-rounded.css" ]
|
|
RUN mkdir -p ./internal/web/dist
|
|
COPY [ "./frontend/dist/", "./internal/web/dist/"]
|
|
|
|
# generate duplicate 1.1MB files
|
|
RUN dd if=/dev/zero of=/app/frontend/tests/playwright-files/1.1MB.bin bs=1024 count=1126 && dd if=/dev/zero of=/app/frontend/tests/playwright-files/1.1mb.bin bs=1024 count=1126
|
|
|
|
# Run tests
|
|
ENV FILEBROWSER_PLAYWRIGHT_TEST=true
|
|
RUN ./filebrowser user set testuser1 --password testuser1 && ./filebrowser & sleep 2 && cd ../frontend && npx playwright test
|