mirror of https://github.com/interlegis/sapl.git
Browse Source
Adiciona Dockerfile de desenvolvimento Adiciona docker-compose de desenvolvimentopull/3163/head
Vinícius Cantuária
5 years ago
committed by
eribeiro
2 changed files with 50 additions and 34 deletions
@ -1,34 +1,8 @@ |
|||||
FROM alpine:3.8 |
FROM python:3.7 |
||||
|
ENV PYTHONUNBUFFERED 1 |
||||
ENV BUILD_PACKAGES postgresql-dev graphviz-dev graphviz build-base git pkgconfig \ |
WORKDIR /sapl-dev |
||||
python3-dev libxml2-dev jpeg-dev libressl-dev libffi-dev libxslt-dev \ |
COPY requirements ./requirements/ |
||||
nodejs py3-lxml py3-magic postgresql-client poppler-utils antiword \ |
RUN apt update && \ |
||||
curl jq openssh-client vim bash |
apt -y install graphviz-dev && \ |
||||
|
pip install -r ./requirements/dev-requirements.txt |
||||
RUN apk update --update-cache && apk upgrade |
EXPOSE 8000 |
||||
|
|
||||
RUN apk --update add fontconfig ttf-dejavu && fc-cache -fv |
|
||||
|
|
||||
RUN apk add --no-cache python3 nginx tzdata && \ |
|
||||
python3 -m ensurepip && \ |
|
||||
rm -r /usr/lib/python*/ensurepip && \ |
|
||||
pip3 install --upgrade pip setuptools && \ |
|
||||
rm -r /root/.cache && \ |
|
||||
rm -f /etc/nginx/conf.d/* |
|
||||
|
|
||||
RUN mkdir -p /var/interlegis/sapl && \ |
|
||||
apk add --update --no-cache $BUILD_PACKAGES |
|
||||
|
|
||||
ADD . /var/interlegis/sapl/ |
|
||||
|
|
||||
WORKDIR /var/interlegis/sapl/ |
|
||||
|
|
||||
RUN pip install -r /var/interlegis/sapl/requirements/dev-requirements.txt --upgrade setuptools && \ |
|
||||
rm -r /root/.cache |
|
||||
|
|
||||
#RUN python3 manage.py collectstatic --noinput --clear |
|
||||
|
|
||||
RUN chmod +x start_devel.sh |
|
||||
|
|
||||
CMD ["/var/interlegis/sapl/start_devel.sh"] |
|
||||
|
|
||||
|
@ -0,0 +1,42 @@ |
|||||
|
version: '3.5' |
||||
|
|
||||
|
services: |
||||
|
sapldb-dev: |
||||
|
container_name: sapldb-dev |
||||
|
image: postgres:10.5-alpine |
||||
|
restart: always |
||||
|
environment: |
||||
|
POSTGRES_PASSWORD: sapl |
||||
|
POSTGRES_USER: sapl |
||||
|
POSTGRES_DB: sapl |
||||
|
ports: |
||||
|
- "5433:5432" |
||||
|
networks: |
||||
|
- sapl-net-dev |
||||
|
|
||||
|
sapl-dev: |
||||
|
container_name: sapl-dev |
||||
|
restart: always |
||||
|
image: sapl:dev |
||||
|
build: |
||||
|
context: . |
||||
|
dockerfile: Dockerfile.dev |
||||
|
command: python3 manage.py runserver 0:8000 |
||||
|
volumes: |
||||
|
- .:/sapl-dev |
||||
|
ports: |
||||
|
- "8000:8000" |
||||
|
environment: |
||||
|
SECRET_KEY: '$dkhxm-$zvxdox$g2-&w^1i!_z1juq0xwox6e3#gy6w_88!3t^' |
||||
|
DEBUG: 'True' |
||||
|
DATABASE_URL: postgresql://sapl:sapl@sapldb-dev:5432/sapl |
||||
|
TZ: America/Sao_Paulo |
||||
|
depends_on: |
||||
|
- sapldb-dev |
||||
|
networks: |
||||
|
- sapl-net-dev |
||||
|
|
||||
|
networks: |
||||
|
sapl-net-dev: |
||||
|
name: sapl-net-dev |
||||
|
driver: bridge |
Loading…
Reference in new issue