Skip to content

Commit

Permalink
Fix postgres docker-compose setup, and expose rabbit for easier test …
Browse files Browse the repository at this point in the history
…running.
  • Loading branch information
vbabiy authored and auvipy committed Jun 14, 2020
1 parent 3ac0525 commit 7d9069c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion docker/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7d9069c

Please sign in to comment.