revert selenoid

This commit is contained in:
2022-08-23 00:58:22 +03:00
parent c01a163d1c
commit 25ab0b0c31
6 changed files with 147 additions and 10 deletions

63
deploy/Dockerfile.bot Normal file
View File

@@ -0,0 +1,63 @@
FROM python:3.10.6
ARG USER
ENV USER=${USER} \
PYTHONFAULTHANDLER=1 \
PYTHONUNBUFFERED=1 \
PYTHONHASHSEED=random \
PYTHONDONTWRITEBYTECODE=1 \
# pip:
PIP_NO_CACHE_DIR=off \
PIP_DISABLE_PIP_VERSION_CHECK=on \
PIP_DEFAULT_TIMEOUT=100 \
POETRY_VIRTUALENVS_CREATE=false \
POETRY_CACHE_DIR='/var/cache/pypoetry' \
PATH="$PATH:/root/.poetry/bin"
RUN printf "================\n\nStart build app. USER is: "${USER}"\n\n===============\n" \
&& apt-get update \
&& apt-get install --no-install-recommends -y \
procps \
bash \
build-essential \
curl \
iputils-ping \
gettext \
git \
libpq-dev \
nano \
sshpass \
&& pip install --upgrade pip \
# Installing `poetry` package manager:
&& pip install poetry \
# Cleaning cache:
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& apt-get clean -y && rm -rf /var/lib/apt/lists/*
WORKDIR /app
RUN if [ "$USER" != "root" ]; then \
mkdir /home/"$USER" \
&& groupadd -r "$USER" && useradd -d /home/"$USER" -r -g "$USER" "$USER" \
&& chown "$USER":"$USER" -R /home/"$USER"; \
fi
COPY --chown="$USER":"$USER" ./poetry.lock ./pyproject.toml /app/
# Installing requirements
RUN poetry version \
&& poetry run pip install -U pip \
&& poetry install \
$(if [ "$USER" != 'root' ]; then echo '--no-dev'; fi) \
--no-interaction --no-ansi \
# Cleaning poetry installation's cache for production:
&& if [ "$USER" != 'root' ]; then rm -rf "$POETRY_CACHE_DIR"; fi
COPY --chown="$USER":"$USER" ./app /app/
USER "$USER"
# Copying actuall application
COPY --chown="$USER":"$USER" . /app/

View File

@@ -0,0 +1,4 @@
FROM selenoid/firefox:103.0 as builder
FROM aerokube/selenoid:latest-release

12
deploy/browsers.json Normal file
View File

@@ -0,0 +1,12 @@
{
"firefox": {
"default": "103.0",
"versions": {
"103.0": {
"image": "selenoid/firefox:103.0",
"port": "4444",
"path": "/wd/hub"
}
}
}
}