Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
KSZK
DevTeam
kszkepzes
old
kszkepzes-backend
Commits
38f2ad22
Commit
38f2ad22
authored
Apr 08, 2020
by
rlacko
💬
Browse files
cleanup
parent
d40803ff
Pipeline
#3170
passed with stages
in 2 minutes
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.travis.yml
deleted
100644 → 0
View file @
d40803ff
language
:
python
python
:
-
"
3.5"
-
"
3.5-dev"
# 3.5 development branch
-
"
3.6"
-
"
3.6-dev"
# 3.6 development branch
-
"
3.7"
-
"
3.7-dev"
# 3.7 development branch
# - "nightly"
services
:
-
postgresql
# command to install dependencies
install
:
-
pip install -r requirements/development.txt
before_script
:
-
psql -c 'create database travis_ci_test;' -U postgres
env
:
-
DATABASE_URL="postgresql://postgres:postgres@postgres:5432/travis_ci_test"
# command to run tests
script
:
-
flake8 --max-line-length=125 --exclude=src/kszkepzes,migrations
-
python src/manage.py migrate
-
python src/manage.py test
Dockerfile
View file @
38f2ad22
# pull official base image
FROM
python:3.8.1
# set work directory
WORKDIR
/usr/src/app
# set environment variables
ENV
PYTHONDONTWRITEBYTECODE 1
ENV
PYTHONUNBUFFERED 1
ENV
TZ Europe/Budapest
ENV
HOME /home/app
ENV
APP_HOME /home/app/kszkepzes-backend
RUN
groupadd app
&&
useradd
-g
app app
&&
\
mkdir
-p
/home/app
&&
mkdir
$APP_HOME
&&
\
mkdir
$APP_HOME
/staticfiles
&&
mkdir
$APP_HOME
/mediafiles
WORKDIR
$APP_HOME
# install dependencies
RUN
apt-get
-y
update
RUN
apt-get
install
-y
python python-pip python-dev python-django-extensions postgresql-client netcat
RUN
pip
install
--upgrade
pip
COPY
./requirements/production.txt /usr/src/app/requirements.txt
COPY
./requirements/production.txt requirements.txt
RUN
apt-get
-y
update
&&
apt-get
install
-y
python python-pip python-dev python-django-extensions postgresql-client netcat
RUN
pip
install
-r
requirements.txt
RUN
apt-get
-y
update
&&
apt-get
-y
autoremove
COPY
./src $APP_HOME
RUN
chown
-R
app:app
$APP_HOME
# copy entrypoint.sh
COPY
./src/entrypoint.sh /usr/src/app/entrypoint.sh
USER
app
# copy project
COPY
./src /usr/src/app/
EXPOSE
8000
# run entrypoint.sh
ENTRYPOINT
["/usr/src/app/entrypoint.sh"]
\ No newline at end of file
CMD
["gunicorn", "kszkepzes.wsgi:application", "--bind", "0.0.0.0:8000"]
Dockerfile.prod
deleted
100644 → 0
View file @
d40803ff
FROM python:3.8.1
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV TZ Europe/Budapest
ENV HOME /home/app
ENV APP_HOME /home/app/kszkepzes-backend
RUN groupadd app && useradd -g app app && \
mkdir -p /home/app && mkdir $APP_HOME && \
mkdir $APP_HOME/staticfiles && mkdir $APP_HOME/mediafiles
WORKDIR $APP_HOME
COPY ./requirements/production.txt requirements.txt
RUN apt-get -y update && apt-get install -y python python-pip python-dev python-django-extensions postgresql-client netcat
RUN pip install -r requirements.txt
COPY ./src $APP_HOME
RUN chown -R app:app $APP_HOME
USER app
EXPOSE 8000
CMD ["gunicorn", "kszkepzes.wsgi:application", "--bind", "0.0.0.0:8000"]
README.md
View file @
38f2ad22
...
...
@@ -6,7 +6,7 @@
## Követelmények
1.
python3
.5
1.
python3
+
2.
pip
## Fejlesztés
...
...
@@ -30,7 +30,3 @@ Atirányítási cím: `http://127.0.0.1:3000/api/v1/complete/authsch`
## Formális Követelmények
1.
flake8-nak feleljen meg
2.
125 karakternél ne legyen hosszabb sor
> TODO: Böviteni a követelményeket
> TODO: Windows-os leírás
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment