Skip to content

Shaikin requirements #40

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
venv
.idea/
*.pyc
*.deb
*.rpm
*.properties

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
*.deb
*.rpm
*.properties
venv
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ sudo: required
# Only build only master branch and tags
branches:
only:
- master
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
- master
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

автоформатирование от pycharm



services:
- docker
Expand Down
34 changes: 23 additions & 11 deletions Dockerfile.centos
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,31 @@ FROM centos:8

LABEL maintainer="[email protected]"

RUN yum install -y rpmdevtools gcc make automake yum-utils git redhat-lsb-core \
openssl-devel zlib-devel pcre-devel epel-release \
&& yum install -y python3 python3-devel python3-pip \
RUN yum install -y \
rpmdevtools \
gcc \
make \
automake \
yum-utils \
git \
redhat-lsb-core \
openssl-devel \
zlib-devel \
pcre-devel \
epel-release \
python3 \
python3-devel \
python3-pip \
&& yum clean all

# Set locales
ENV LANG en_US.UTF-8
ENV LC_CTYPE en_US.UTF-8
ENV LANG=en_US.UTF-8 \
LC_CTYPE=en_US.UTF-8
TZ=Europe/Moscow \
PROJECT_DIR=/nginx-builder

# timezone
ENV TZ Europe/Moscow
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

WORKDIR /nginx-builder
COPY . /nginx-builder
RUN pip3.6 install -r requirements.txt --no-cache-dir
WORKDIR $PROJECT_DIR
COPY . $PROJECT_DIR

RUN pip3.6 install -r requirements\prod.txt --no-cache-dir
34 changes: 23 additions & 11 deletions Dockerfile.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,31 @@ FROM centos:7

LABEL maintainer="[email protected]"

RUN yum install -y rpmdevtools gcc make automake yum-utils git redhat-lsb-core \
openssl-devel zlib-devel pcre-devel epel-release \
&& yum install -y python3 python3-devel python3-pip \
RUN yum install -y \
rpmdevtools \
gcc \
make \
automake \
yum-utils \
git \
redhat-lsb-core \
openssl-devel \
zlib-devel \
pcre-devel \
epel-release \
python3 \
python3-devel \
python3-pip \
&& yum clean all

# Set locales
ENV LANG en_US.UTF-8
ENV LC_CTYPE en_US.UTF-8
ENV LANG=en_US.UTF-8 \
LC_CTYPE=en_US.UTF-8 \
TZ=Europe/Moscow \
PROJECT_DIR=/nginx-builder

# timezone
ENV TZ Europe/Moscow
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

WORKDIR /nginx-builder
COPY . /nginx-builder
RUN pip3.6 install -r requirements.txt --no-cache-dir
WORKDIR $PROJECT_DIR
COPY . $PROJECT_DIR

RUN pip3.6 install -r requirements\prod.txt --no-cache-dir
52 changes: 39 additions & 13 deletions Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,47 @@ FROM ubuntu:18.04
LABEL maintainer="[email protected]"

RUN apt-get update && \
apt-get install -y locales wget build-essential autogen automake autoconf \
autotools-dev libreadline-dev libncurses5-dev libpcre3 libpcre3-dev libpng-dev \
dh-make quilt lsb-release debhelper dpkg-dev dh-systemd pkg-config \
zlib1g-dev libssl-dev openssl git perl libtool tar unzip xutils-dev \
python3-pip python3-apt
apt-get install -y \
locales \
wget \
build-essential \
autogen \
automake \
autoconf \
autotools-dev \
libreadline-dev \
libncurses5-dev \
libpcre3 \
libpcre3-dev \
libpng-dev \
dh-make \
quilt \
lsb-release \
debhelper \
dpkg-dev \
dh-systemd \
pkg-config \
zlib1g-dev \
libssl-dev \
openssl \
git \
perl \
libtool \
tar \
unzip \
xutils-dev \
python3-pip \
python3-apt

# Set locales
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LC_CTYPE en_US.UTF-8

# timezone
ENV TZ Europe/Moscow
ENV LANG=en_US.UTF-8 \
LC_CTYPE=en_US.UTF-8 \
PROJECT_DIR=/nginx-builder \
TZ=Europe/Moscow

RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

WORKDIR /nginx-builder
COPY . /nginx-builder
RUN pip3 install -r requirements.txt
WORKDIR $PROJECT_DIR
COPY . $PROJECT_DIR
RUN pip3 install -r requirements\prod.txt
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,15 @@ configure_params: список дополнительных параметров
### ENG
You will also need packages to compile Nginx. Their list can be seen in the Dockerfile.
```bash
pip3 install -r requirements.txt
pip3 install -r requirements\dev.txt
./main.py build -f [config_file].yaml -r [revision_number]
```
* revision number optional parameter, used to version assemblies

### RU
Также потребуются пакеты для компиляции Nginx. Их перечень можно увидеть в Dockerfile
```bash
pip3 install -r requirements.txt
pip3 install -r requirements\dev.txt
./main.py build -f [конфиг_файл].yaml -r [номер_ревизии]
```
* номер ревизии опциональный параметр, служит для версионирования сборок
2 changes: 2 additions & 0 deletions requirements/dev.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-r main.in
pip-tools
52 changes: 52 additions & 0 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#
# This file is autogenerated by pip-compile with python 3.9
# To update, run:
#
# pip-compile --output-file='requirements\dev.txt' 'requirements\dev.in'
#
beautifulsoup4==4.7.1
# via -r requirements\main.in
certifi==2022.5.18.1
# via requests
chardet==3.0.4
# via requests
click==8.1.3
# via pip-tools
colorama==0.4.4
# via click
distro==1.3.0
# via -r requirements\main.in
gitdb==4.0.9
# via gitpython
gitpython==3.1.0
# via -r requirements\main.in
idna==2.7
# via requests
packaging==19.0
# via -r requirements\main.in
pep517==0.12.0
# via pip-tools
pip-tools==6.6.1
# via -r requirements\dev.in
pyparsing==3.0.9
# via packaging
pyyaml==5.4
# via -r requirements\main.in
requests==2.20.0
# via -r requirements\main.in
six==1.16.0
# via packaging
smmap==5.0.0
# via gitdb
soupsieve==2.3.2.post1
# via beautifulsoup4
tomli==2.0.1
# via pep517
urllib3==1.24.3
# via requests
wheel==0.37.1
# via pip-tools

# The following packages are considered to be unsafe in a requirements file:
# pip
# setuptools
2 changes: 1 addition & 1 deletion requirements.txt → requirements/main.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ requests==2.20.0
GitPython==3.1.0
distro==1.3.0
packaging==19.0
beautifulsoup4==4.7.1
beautifulsoup4==4.7.1
Empty file added requirements/prod.in
Empty file.
6 changes: 6 additions & 0 deletions requirements/prod.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#
# This file is autogenerated by pip-compile with python 3.9
# To update, run:
#
# pip-compile --output-file='requirements\prod.txt' 'requirements\prod.in'
#