Skip to content

Instantly share code, notes, and snippets.

@antonioj-mattos
Last active June 2, 2021 17:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save antonioj-mattos/ec25bbd142013acfe9637a17d30618f6 to your computer and use it in GitHub Desktop.
Save antonioj-mattos/ec25bbd142013acfe9637a17d30618f6 to your computer and use it in GitHub Desktop.
version: '2'
services:
db:
image: postgres
volumes:
# pasta com os backups para restauração
# docker exec -it suap_db_1 /bin/bash
# cd /backups
# su postgres
# pg_restore -v -d postgres nomedoarquivo.backup
- ./backups:/backups
ports:
- "5432:5432"
web:
build: .
command: python manage.py runserver 0.0.0.0:8000
volumes:
- .:/code
ports:
- "8000:8000"
depends_on:
- db
# docker exec -it suap_web_1 /bin/bash
FROM python:2.7
RUN apt-get update && apt-get install -y --no-install-recommends \
libsasl2-dev \
libldap2-dev \
freetds-dev \
libxslt1-dev \
libblas-dev \
liblapack-dev \
libatlas-base-dev \
gfortran \
python-dev \
python-psycopg2 \
postgresql-contrib
RUN mkdir /code
WORKDIR /code
COPY deploy/requirements.txt /code
RUN pip install -r requirements.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment