-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from zeerayne/feature/rac-ras-mode
Режим работы через сервер администрирования RAS
- Loading branch information
Showing
55 changed files
with
1,756 additions
and
581 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 @@ | ||
.* |
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
18 changes: 9 additions & 9 deletions
18
.github/workflows/flake8.yaml → .github/workflows/ruff.yaml
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 |
---|---|---|
@@ -1,29 +1,29 @@ | ||
# This workflow will check modified files with flake8 | ||
# This workflow will check modified files with ruff | ||
|
||
name: flake8 | ||
name: ruff | ||
on: | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
jobs: | ||
flake8: | ||
ruff: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
- name: Install Python | ||
uses: actions/setup-python@v4 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
- name: Install Poetry | ||
uses: abatilo/actions-poetry@v2.3.0 | ||
uses: abatilo/actions-poetry@v3 | ||
- name: Install dependencies | ||
run: make install-dev | ||
- name: Get changed python source files | ||
id: changed-files | ||
uses: tj-actions/changed-files@v41 | ||
uses: tj-actions/changed-files@v45 | ||
with: | ||
files: | | ||
*.py | ||
- name: Check code with flake8 | ||
- name: Check code with ruff | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
run: poetry run flake8 ${{ steps.changed-files.outputs.all_changed_files }} | ||
run: poetry run ruff check ${{ steps.changed-files.outputs.all_changed_files }} |
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 |
---|---|---|
@@ -1,15 +1,10 @@ | ||
repos: | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.10.1 | ||
hooks: | ||
- id: isort | ||
args: ["--profile", "black", "--filter-files"] | ||
- repo: https://github.com/psf/black-pre-commit-mirror # Using this mirror lets us use mypyc-compiled black, which is about 2x faster | ||
rev: 23.10.1 | ||
hooks: | ||
- id: black | ||
# It is recommended to specify the latest version of Python | ||
# supported by your project here, or alternatively use | ||
# pre-commit's default_language_version, see | ||
# https://pre-commit.com/#top_level-default_language_version | ||
language_version: python3.11 | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
# Ruff version. | ||
rev: v0.8.2 | ||
hooks: | ||
# Run the linter. | ||
- id: ruff | ||
args: [ --fix ] | ||
# Run the formatter. | ||
- id: ruff-format |
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,29 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Debug: Remote Attach", | ||
"type": "debugpy", | ||
"request": "attach", | ||
"connect": { | ||
"host": "localhost", | ||
"port": 5678 | ||
}, | ||
"pathMappings": [ | ||
{ | ||
"localRoot": "${workspaceFolder}", | ||
"remoteRoot": "." | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "Debug: pytest", | ||
"type": "debugpy", | ||
"request": "launch", | ||
"module": "pytest", | ||
"args": [ | ||
"--spec" | ||
] | ||
} | ||
] | ||
} |
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,18 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "Run `docker compose up` with debug config", | ||
"type": "docker-compose", | ||
"dockerCompose": { | ||
"up": { | ||
"detached": false, | ||
"build": false | ||
}, | ||
"files": [ | ||
"${workspaceFolder}/docker-compose.debug.yml" | ||
] | ||
} | ||
} | ||
] | ||
} |
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,47 @@ | ||
FROM debian:12 AS v8-base | ||
ENV RAGENT_HOST ragent | ||
ENV RAGENT_PORT 1540 | ||
ENV RAGENT_REGPORT 1541 | ||
ENV RAGENT_PORTRANGE 1560:1591 | ||
ENV RAS_PORT 1545 | ||
WORKDIR /distr | ||
COPY /docker/1c-enterprise-*-common_*_amd64.deb common_amd64.deb | ||
COPY /docker/1c-enterprise-*-server_*_amd64.deb server_amd64.deb | ||
RUN dpkg -i common_amd64.deb && dpkg -i server_amd64.deb && rm *.deb | ||
WORKDIR /opt/1cv8 | ||
|
||
FROM v8-base AS ragent | ||
ENV RAGENT_HOME /home/1c/ragent | ||
RUN mkdir -p ${RAGENT_HOME}/reg_${RAGENT_REGPORT} | ||
COPY docker/ragent-entrypoint.sh /opt/docker/entrypoint.sh | ||
RUN chmod +x /opt/docker/entrypoint.sh | ||
ENTRYPOINT ["/opt/docker/entrypoint.sh"] | ||
|
||
FROM v8-base AS ras | ||
COPY docker/ras-entrypoint.sh /opt/docker/entrypoint.sh | ||
RUN chmod +x /opt/docker/entrypoint.sh | ||
ENTRYPOINT ["/opt/docker/entrypoint.sh"] | ||
|
||
FROM python:3.12 AS python-base | ||
ENV PYTHONUNBUFFERED 1 | ||
ENV POETRY_VERSION=1.8.4 | ||
ENV POETRY_HOME=/opt/poetry | ||
ENV POETRY_VENV=/opt/poetry-venv | ||
ENV POETRY_CACHE_DIR=/opt/.cache | ||
|
||
FROM python-base AS poetry-base | ||
RUN python3 -m venv $POETRY_VENV \ | ||
&& $POETRY_VENV/bin/pip install -U pip setuptools \ | ||
&& $POETRY_VENV/bin/pip install poetry==${POETRY_VERSION} | ||
|
||
FROM python-base AS rac | ||
COPY --from=ras /opt/1cv8 /opt/1cv8 | ||
COPY --from=poetry-base ${POETRY_VENV} ${POETRY_VENV} | ||
ENV PATH="${PATH}:${POETRY_VENV}/bin" | ||
WORKDIR /app | ||
COPY pyproject.toml poetry.lock ./ | ||
RUN poetry check \ | ||
&& poetry install --no-interaction --no-cache --no-root --without dev --with debug | ||
COPY docker/rac-entrypoint.sh /opt/docker/entrypoint.sh | ||
RUN chmod +x /opt/docker/entrypoint.sh | ||
ENTRYPOINT ["/opt/docker/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,36 @@ | ||
FROM debian:12 | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
ENV PG_APP_HOME="/etc/docker-postgresql"\ | ||
PG_VERSION=15 \ | ||
PG_USER=postgres \ | ||
PG_HOME=/var/lib/postgresql \ | ||
PG_RUNDIR=/run/postgresql \ | ||
PG_LOGDIR=/var/log/postgresql \ | ||
PG_CERTDIR=/etc/postgresql/certs | ||
|
||
ENV PG_BINDIR=/opt/pgpro/1c-${PG_VERSION}/bin \ | ||
PG_DATADIR=${PG_HOME}/${PG_VERSION}/main | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y sudo locales wget gnupg2 \ | ||
&& localedef -i ru_RU -c -f UTF-8 -A /usr/share/locale/locale.alias ru_RU.UTF-8 \ | ||
&& update-locale LANG=ru_RU.UTF-8 | ||
|
||
ENV LANG ru_RU.UTF-8 | ||
|
||
RUN wget --quiet -O - http://repo.postgrespro.ru/keys/GPG-KEY-POSTGRESPRO | apt-key add - \ | ||
&& echo 'deb http://repo.postgrespro.ru/1c/1c-'${PG_VERSION}'/debian '$(env -i bash -c '. /etc/os-release; echo $VERSION_CODENAME')' main' > /etc/apt/sources.list.d/postgrespro-1c.list \ | ||
&& apt-get update \ | ||
&& apt-get install -y postgrespro-1c-${PG_VERSION} \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
COPY docker/posgres-runtime/ ${PG_APP_HOME}/ | ||
COPY docker/posgres-entrypoint.sh /opt/docker/entrypoint.sh | ||
|
||
EXPOSE 5432 | ||
VOLUME ${PG_DATADIR} | ||
WORKDIR ${PG_HOME} | ||
RUN chmod +x /opt/docker/entrypoint.sh | ||
ENTRYPOINT ["/opt/docker/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
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
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
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
Oops, something went wrong.