Skip to content
Snippets Groups Projects
Commit 38f2ad22 authored by Rafael László's avatar Rafael László :speech_balloon:
Browse files

cleanup

parent d40803ff
No related branches found
No related tags found
No related merge requests found
Pipeline #3170 passed
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
# 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"]
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"]
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment