From 7d9069c2e83433d5ce5db89dc25105b7788ca480 Mon Sep 17 00:00:00 2001 From: Vitaly Babiy Date: Sat, 13 Jun 2020 16:32:19 -0400 Subject: [PATCH] Fix postgres docker-compose setup, and expose rabbit for easier test running. --- docker-compose.yml | 7 +++++-- docker/base/Dockerfile | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 24566ab2..bab3f4e1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -43,7 +43,10 @@ services: - './django_celery_beat/:/app/django_celery_beat/' rabbit: - image: rabbitmq - + image: rabbitmq + ports: + - "5672:5672" postgres: image: postgres + environment: + POSTGRES_PASSWORD: s3cr3t diff --git a/docker/base/Dockerfile b/docker/base/Dockerfile index 91451657..9c555c79 100644 --- a/docker/base/Dockerfile +++ b/docker/base/Dockerfile @@ -29,7 +29,7 @@ RUN django-admin startproject mysite WORKDIR /mysite/ -RUN echo 'DATABASES = {"default": {"ENGINE": "django.db.backends.postgresql", "NAME": "postgres", "USER": "postgres", "HOST": "postgres", "PORT": 5432}}' >> mysite/settings.py +RUN echo 'DATABASES = {"default": {"ENGINE": "django.db.backends.postgresql", "NAME": "postgres", "USER": "postgres","PASSWORD": "s3cr3t", "HOST": "postgres", "PORT": 5432}}' >> mysite/settings.py RUN echo 'ALLOWED_HOSTS = ["*"]' >> mysite/settings.py RUN echo 'INSTALLED_APPS += ("django_celery_beat", )' >> mysite/settings.py RUN echo 'INSTALLED_APPS += ("django_createsuperuserwithpassword", )' >> mysite/settings.py