LIL-75 Add docker-compose.yml

remotes/origin/hasaccess
Sergey G 8 years ago
parent b692162e95
commit c3fc358728
  1. 11
      Dockerfile
  2. 20
      docker-compose.yml
  3. 6
      project/settings.py
  4. 1
      requirements.txt

@ -0,0 +1,11 @@
FROM python:3.6
ENV PYTHONUNBUFFERED 1
RUN mkdir /lilcity
WORKDIR /lilcity
ADD requirements.txt /lilcity/
RUN apt-get update \
&& apt-get install -y postgresql-client-9.4 \
&& rm -rf /var/lib/apt/lists/* \
&& pip install --upgrade pip \
&& pip install -r requirements.txt
ADD . /lilcity/

@ -0,0 +1,20 @@
version: '3'
services:
postgres:
image: postgres:9.6
environment:
- POSTGRES_PASSWORD=1234
- POSTGRES_USER=postgres
web:
build: .
restart: always
volumes:
- .:/lilcity
command: bash -c "python manage.py migrate && python manage.py runserver 0.0.0.0:8000"
environment:
- DJANGO_SETTINGS_MODULE=project.settings
ports:
- "8000:8000"
depends_on:
- postgres

@ -25,7 +25,7 @@ SECRET_KEY = 'jelm*91lj(_-o20+6^a+bgv!4s6e_efry^#+f#=1ak&s1xr-2j'
# SECURITY WARNING: don't run with debug turned on in production! # SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True DEBUG = True
ALLOWED_HOSTS = [] ALLOWED_HOSTS = ["*"] # fixme: production mode
# Application definition # Application definition
@ -125,6 +125,10 @@ USE_TZ = True
# https://docs.djangoproject.com/en/2.0/howto/static-files/ # https://docs.djangoproject.com/en/2.0/howto/static-files/
STATIC_URL = '/static/' STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, "static")
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, "media")
# Email # Email

@ -2,3 +2,4 @@ Django==2.0.1
django-anymail[mailgun]==1.2 django-anymail[mailgun]==1.2
paymentwall-python==1.0.7 paymentwall-python==1.0.7
twilio==6.10.0 twilio==6.10.0
psycopg2==2.7.3.2
Loading…
Cancel
Save