mirror of https://github.com/snachodog/mybuddy.git
Add docker-compose.yml (WIP).
This commit is contained in:
parent
6ff310f15e
commit
c4527cbced
|
@ -27,9 +27,8 @@ ADD core /app/core
|
||||||
ADD dashboard /app/dashboard
|
ADD dashboard /app/dashboard
|
||||||
ADD reports /app/reports
|
ADD reports /app/reports
|
||||||
ENV DJANGO_SETTINGS_MODULE babybuddy.settings.development
|
ENV DJANGO_SETTINGS_MODULE babybuddy.settings.development
|
||||||
|
ENV SECRET_KEY TODOCHANGEME
|
||||||
COPY --from=build /build/babybuddy/static /app/babybuddy/static
|
COPY --from=build /build/babybuddy/static /app/babybuddy/static
|
||||||
RUN python manage.py collectstatic --no-input
|
RUN python manage.py collectstatic --no-input
|
||||||
RUN python manage.py migrate
|
RUN python manage.py migrate
|
||||||
ADD etc/gunicorn.py /app/
|
ADD etc/gunicorn.py /app/
|
||||||
EXPOSE 8000
|
|
||||||
ENTRYPOINT gunicorn -c /app/gunicorn.py babybuddy.wsgi
|
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
import os
|
||||||
|
|
||||||
|
from .base import * # noqa: F401,F403
|
||||||
|
|
||||||
|
|
||||||
|
DEBUG = os.environ.get('DEBUG', False)
|
||||||
|
|
||||||
|
|
||||||
|
# SECURITY WARNING: keep the secret key used in production secret!
|
||||||
|
|
||||||
|
SECRET_KEY = os.environ.get('SECRET_KEY')
|
||||||
|
|
||||||
|
|
||||||
|
# Database
|
||||||
|
# https://docs.djangoproject.com/en/1.11/ref/settings/#databases
|
||||||
|
|
||||||
|
DATABASES = {
|
||||||
|
'default': {
|
||||||
|
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
||||||
|
'NAME': 'postgres',
|
||||||
|
'USER': 'postgres',
|
||||||
|
'HOST': 'db',
|
||||||
|
'PORT': 5432,
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
version: "2"
|
||||||
|
|
||||||
|
services:
|
||||||
|
db:
|
||||||
|
image: postgres
|
||||||
|
web:
|
||||||
|
build: .
|
||||||
|
command: gunicorn -c /app/gunicorn.py babybuddy.wsgi
|
||||||
|
ports:
|
||||||
|
- "8000:8000"
|
||||||
|
depends_on:
|
||||||
|
- db
|
Loading…
Reference in New Issue