Skip to content

Commit d0082a1

Browse files
committed
Dockerization
1 parent bfa456f commit d0082a1

Some content is hidden

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

58 files changed

+418
-516
lines changed

.gitlab-ci.yml

-27
This file was deleted.

Dockerfile

+17-9
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
1-
FROM ubuntu:latest
1+
FROM ubuntu:18.04
22

3-
RUN apt-get update && apt-get install -y locales libxml2-dev libxslt1-dev curl libsasl2-dev python-dev libldap2-dev libssl-dev && locale-gen ru_RU.UTF-8 && apt-get update && apt-get install -y python3-pip
3+
COPY atccore /atccore
44

5-
ENV LANG=ru_RU.UTF-8 LC_ALL=ru_RU.UTF-8 LC_LANG=ru_RU.UTF-8
5+
WORKDIR /atccore
66

7-
COPY requirements.txt /app/requirements.txt
7+
RUN apt-get update && \
8+
apt-get install -y --no-install-recommends python3.6 python3-pip locales python3-setuptools && \
9+
rm -rf /var/lib/apt/lists/* && \
10+
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
811

9-
RUN pip3 install -r /app/requirements.txt
12+
ENV LANG en_US.utf8
1013

11-
COPY . /app
14+
RUN pip3 install pipenv && \
15+
pipenv install && \
16+
pipenv run ./manage.py collectstatic && \
17+
pipenv run ./manage.py migrate && \
18+
pipenv run ./manage.py shell -c "from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.create_superuser('admin', 'admin@localhost', 'admin')"
1219

13-
WORKDIR /app
14-
15-
CMD "./startup.sh"
20+
ADD entrypoint.sh /entrypoint.sh
21+
RUN chmod +x /entrypoint.sh
22+
EXPOSE 8000
23+
ENTRYPOINT "/entrypoint.sh"

README.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# **!!!!UNDER DEVELOPMENT!!!!**
2-
3-
# This is an ATC-project API.
1+
# This is an ATC-project API
42

53
| Entity | Readiness |
64
| --- | --- |

atccore/Pipfile

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[[source]]
2+
name = "pypi"
3+
url = "https://pypi.org/simple"
4+
verify_ssl = true
5+
6+
[dev-packages]
7+
8+
[packages]
9+
djangorestframework = "==3.10"
10+
django-filter = "*"
11+
psycopg2-binary = "*"
12+
pytz = "*"
13+
sqlparse = "*"
14+
requests = "*"
15+
elasticsearch = "*"
16+
pytest = "*"
17+
Django = "==2.2.10"
18+
Markdown = "*"
19+
PyYAML = "*"
20+
Jinja2 = "*"
21+
gunicorn = "*"
22+
23+
[requires]
24+
python_version = "3.6"

atccore/Pipfile.lock

+299
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.

atc/admin.py atccore/atc/admin.py

File renamed without changes.

atc/apps.py atccore/atc/apps.py

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

atc/tests.py atccore/atc/tests.py

File renamed without changes.

atc/urls.py atccore/atc/urls.py

File renamed without changes.

atc/views.py atccore/atc/views.py

File renamed without changes.

0 commit comments

Comments
 (0)