-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
4a139ca
commit de1a1f8
Showing
3 changed files
with
72 additions
and
0 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,25 @@ | ||
# syntax=docker/dockerfile:1 | ||
FROM python:3.11.4 | ||
|
||
ENV PYTHONUNBUFFERED=1 | ||
ENV PYTHON_BIN=python | ||
|
||
WORKDIR /code | ||
|
||
# install system dependencies | ||
RUN apt update && apt install git -y | ||
|
||
# cleanup apt cache | ||
RUN rm -rf /var/lib/apt/lists/* | ||
|
||
COPY test-config /test-config | ||
COPY fractal /code/fractal | ||
COPY pyproject.toml README.md /code/ | ||
COPY tests /code/tests | ||
|
||
COPY .coveragerc conftest.py /code/ | ||
|
||
# install modules | ||
RUN pip3 install -e /code[dev] | ||
|
||
ENTRYPOINT [ "/test-config/entrypoint.sh" ] |
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,37 @@ | ||
services: | ||
synapse: | ||
image: fractal-matrix-client-synapse:latest | ||
build: | ||
context: ./synapse/config | ||
dockerfile: Dockerfile.synapse | ||
args: | ||
SYNAPSE_SERVER_NAME: "localhost" | ||
SYNAPSE_REPORT_STATS: "no" | ||
healthcheck: | ||
test: curl localhost:8008/health | ||
interval: 1s | ||
timeout: 10s | ||
retries: 10 | ||
labels: | ||
- "org.homeserver.test=true" | ||
# --timeout on up doesn't work with --exit-code-from. This ensures the synapse | ||
# container is stopped immediately when the device exits | ||
stop_signal: SIGKILL | ||
test: | ||
image: fractal-matrix-client-test:test | ||
build: | ||
context: ./ | ||
dockerfile: Dockerfile.test | ||
depends_on: | ||
synapse: | ||
condition: service_healthy | ||
environment: | ||
ENV: test | ||
TEST_CONFIG_DIR: /test-config | ||
TEST_HOMESERVER_URL: http://synapse:8008 | ||
# not actually running a second synapse currently | ||
TEST_ALTERNATE_HOMESERVER_URL: https://synapse2:8008 | ||
SYNAPSE_DOCKER_LABEL: "org.homeserver.test=true" | ||
volumes: | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
working_dir: /code |
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