Skip to content

Commit 04855b6

Browse files
2.0.0
### BREAKING CHANGES: * Changed API version to v3. * Changed OpenAPI schema. * Dropped old bulk mechanism (now available only [`/api/endpoint/`](https://vstutils.vstconsulting.net/en/stable/backend.html#bulk-requests)). * Squashed and removed old migrations (allowed to update only from 1.X versions). #### Changelog: * Chore: Migrate to `vstutils==5.0`. * Feature: Provided support live update with centrifugo. * Feature: Improved GUI performance and design. * Feature: Provided Python 3.10 support. * Optimization: Improved performance on `git` projects sync. * Optimization: Used `CTE` on database for inner groups. * Docs: Improved documentation. * Fix: Removed useless fields on copy groups. * Fix: Sync projects on changed origin's url. * Fix: Twice call of `on_user_upd` hook. * Fix: Calling old planned periodic tasks after long idling. * Fix: Other small bugs. See merge request polemarch/ce!267
2 parents 4c22429 + b1b3ee4 commit 04855b6

File tree

306 files changed

+8311
-9523
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

306 files changed

+8311
-9523
lines changed

Dockerfile

Lines changed: 47 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,80 @@
11
# syntax=docker/dockerfile:1
22

3-
FROM vstconsulting/images:tox AS build
3+
FROM registry.gitlab.com/vstconsulting/images:ubuntu AS build
44

5+
RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache
56
WORKDIR /usr/local/polemarch
67

8+
ENV CC='ccache gcc'
9+
10+
RUN --mount=type=cache,target=/var/cache/apt \
11+
--mount=type=cache,target=/var/lib/apt \
12+
--mount=type=cache,target=/root/.cache/pip \
13+
apt update && \
14+
apt -y install --no-install-recommends \
15+
default-libmysqlclient-dev \
16+
libpcre3-dev \
17+
python3.8-dev \
18+
libldap2-dev \
19+
libsasl2-dev \
20+
libffi-dev \
21+
libkrb5-dev \
22+
krb5-multidev \
23+
libssl-dev \
24+
libpq-dev \
25+
gcc
26+
727
COPY . .
828

929
RUN --mount=type=cache,target=/root/.cache/pip \
1030
--mount=type=cache,target=/cache \
1131
--mount=type=cache,target=/usr/local/polemarch/.tox \
12-
rm -rf dist/* && \
13-
tox -c tox_build.ini -e py36-build
32+
tox -e build_for_docker
1433

1534
###############################################################
1635

17-
FROM vstconsulting/images:python
36+
FROM registry.gitlab.com/vstconsulting/images:python as production
1837

1938
RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache
2039

40+
ARG PACKAGE_NAME=polemarch
41+
2142
ENV WORKER=ENABLE \
2243
LC_ALL=en_US.UTF-8 \
2344
LANG=en_US.UTF-8 \
24-
POLEMARCH_PROJECTS_DIR=/projects
45+
POLEMARCH_UWSGI_LIMITS=1536 \
46+
POLEMARCH_UWSGI_PIDFILE=/tmp/web.pid \
47+
POLEMARCH_PROJECTS_DIR=/projects \
48+
POLEMARCH_SQLITE_DIR=/var/lib/polemarch/
2549

2650
RUN --mount=type=cache,target=/var/cache/apt \
2751
--mount=type=cache,target=/var/lib/apt \
2852
--mount=type=cache,target=/root/.cache/pip \
2953
--mount=type=bind,from=build,source=/usr/local/polemarch/,target=/polemarch_env \
3054
apt update && \
3155
apt -y install --no-install-recommends \
32-
git \
33-
sudo \
34-
sshpass \
35-
libpcre3 \
36-
libpcre3-dev \
37-
python3.8-dev \
38-
libldap2-dev \
39-
libldap-2.4-2 \
40-
libsasl2-dev \
41-
libsasl2-2 \
42-
libffi-dev \
43-
libffi7 \
44-
libkrb5-dev \
45-
krb5-multidev \
46-
libssl-dev \
47-
libssl1.1 \
48-
gcc && \
49-
python3.8 -m pip install --upgrade pip -U \
50-
wheel \
51-
setuptools \
52-
cryptography \
53-
paramiko && \
56+
git \
57+
sudo \
58+
sshpass \
59+
libmysqlclient21 \
60+
libpcre3 \
61+
libldap-2.4-2 \
62+
libsasl2-2 \
63+
libffi7 \
64+
libssl1.1 && \
65+
python3.8 -m pip install cryptography paramiko 'pip<22' && \
5466
ln -s /usr/bin/python3.8 /usr/bin/python && \
55-
mkdir -p /projects /hooks /run/openldap /etc/polemarch/hooks && \
56-
python3.8 -m pip install /polemarch_env/dist/$(ls /polemarch_env/dist/ | grep "\.tar\.gz" | tail -1)[mysql,postgresql] && \
57-
apt remove -y \
58-
libpcre3-dev \
59-
python3.8-dev \
60-
libldap2-dev \
61-
libsasl2-dev \
62-
libssl-dev \
63-
libkrb5-dev \
64-
libffi-dev \
65-
default-libmysqlclient-dev \
66-
gcc && \
67+
mkdir -p /projects /hooks /run/openldap /etc/polemarch/hooks /var/lib/polemarch && \
68+
python3.8 -m pip install --no-index --find-links /polemarch_env/wheels $PACKAGE_NAME[mysql,postgresql,ansible] && \
69+
find /usr/lib/python3.8 -regex '.*\(*.pyc\|__pycache__\).*' -delete && \
6770
apt autoremove -y && \
6871
rm -rf /tmp/* \
69-
/var/tmp/* \
70-
/var/log/apt/*
72+
/var/tmp/* \
73+
/var/log/apt/*
7174

72-
RUN useradd -m -s /bin/bash -U polemarch && \
73-
chown -R polemarch /projects /hooks /run/openldap /etc/polemarch
75+
RUN useradd -m -s /bin/bash -U -u 1000 polemarch && \
76+
chown -R polemarch /projects /hooks /run/openldap /etc/polemarch /var/lib/polemarch && \
77+
ln -s /usr/bin/python3.8 /usr/local/bin/python
7478

7579
USER polemarch
7680

doc/api.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This is an example of api schema, but you can find actual schema on Polemarch ho
1313
Structure
1414
-----------------------
1515

16-
In Polemarch we have some entities that can be nested to another entities. Below examples of such entites:
16+
In Polemarch we have some entities that can be nested to another entities. Below examples of such entities:
1717

1818
**Inventory** can be nested into **Project**
1919

0 commit comments

Comments
 (0)