mirror of
https://github.com/akuker/RASCSI.git
synced 2024-11-25 05:32:20 +00:00
6514e24770
* Dockerize Pytest * Fix auto-delete warning in delete file test * Allow tests to be executed with a non-default home dir * Use hostname for Docker container only if tests executed in Docker * Update container entrypoint to pytest * Re-format tests with black * Define if the execution environment is a Docker container in env fixture * Skip unsupported host bridge attachment test in Docker
72 lines
1.9 KiB
YAML
72 lines
1.9 KiB
YAML
services:
|
|
rascsi:
|
|
container_name: rascsi
|
|
image: rascsi:develop-${OS_DISTRO:-debian}-${OS_VERSION:-buster}-${OS_ARCH:-amd64}-standalone
|
|
pull_policy: never
|
|
build:
|
|
context: ..
|
|
dockerfile: docker/rascsi/Dockerfile
|
|
args:
|
|
- OS_DISTRO=${OS_DISTRO:-debian}
|
|
- OS_VERSION=${OS_VERSION:-buster}
|
|
- OS_ARCH=${OS_ARCH:-amd64}
|
|
volumes:
|
|
- ./volumes/images:/home/pi/images:delegated
|
|
- ./volumes/config:/home/pi/.config/rascsi:delegated
|
|
ports:
|
|
- "127.0.0.1:${RASCSI_PORT:-6868}:6868"
|
|
environment:
|
|
- RASCSI_PASSWORD=${RASCSI_PASSWORD:-}
|
|
init: true
|
|
command: [
|
|
"/usr/local/bin/rascsi_wrapper.sh",
|
|
"-L",
|
|
"${RASCSI_LOG_LEVEL:-trace}",
|
|
"-r",
|
|
"7",
|
|
"-F",
|
|
"/home/pi/images"
|
|
]
|
|
|
|
rascsi_web:
|
|
container_name: rascsi_web
|
|
image: rascsi:develop-${OS_DISTRO:-debian}-${OS_VERSION:-buster}-${OS_ARCH:-amd64}-web
|
|
pull_policy: never
|
|
build:
|
|
context: ..
|
|
dockerfile: docker/rascsi-web/Dockerfile
|
|
args:
|
|
- OS_DISTRO=${OS_DISTRO:-debian}
|
|
- OS_VERSION=${OS_VERSION:-buster}
|
|
- OS_ARCH=${OS_ARCH:-amd64}
|
|
volumes:
|
|
- ./volumes/images:/home/pi/images:delegated
|
|
- ./volumes/config:/home/pi/.config/rascsi:delegated
|
|
ports:
|
|
- "127.0.0.1:${WEB_HTTP_PORT:-8080}:80"
|
|
- "127.0.0.1:${WEB_HTTPS_PORT:-8443}:443"
|
|
environment:
|
|
- RASCSI_PASSWORD=${RASCSI_PASSWORD:-}
|
|
init: true
|
|
command: [
|
|
"start.sh",
|
|
"--rascsi-host=${RASCSI_HOST:-rascsi}",
|
|
"--rascsi-port=${RASCSI_PORT:-6868}",
|
|
"--log-level=${WEB_LOG_LEVEL:-info}",
|
|
"--dev-mode"
|
|
]
|
|
|
|
pytest:
|
|
container_name: pytest
|
|
image: rascsi:pytest
|
|
pull_policy: never
|
|
profiles:
|
|
- webui-tests
|
|
build:
|
|
context: ..
|
|
dockerfile: docker/pytest/Dockerfile
|
|
volumes:
|
|
- ../python/web:/src:delegated
|
|
working_dir: /src
|
|
entrypoint: "pytest"
|