Skip to content

Commit

Permalink
Add simple index view
Browse files Browse the repository at this point in the history
  • Loading branch information
kacperlukawski committed Apr 9, 2020
1 parent e7aa192 commit f9f3af0
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.idea
.idea/
docker/.data/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Heroku one.
#### First steps

1. Login to your Heroku account from the console using `heroku login`.
2. Create a new Heroku project with `heroku create [APP_NAME]`.
2. Create a new Heroku project with `heroku create [APP_NAME]git`.
This command allows to have several
3. Provision a PostgreSQL database with
`heroku addons:create heroku-postgresql:hobby-dev`.
Expand Down
3 changes: 3 additions & 0 deletions application/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
from django.contrib import admin
from django.urls import path

from application.views import index_view

urlpatterns = [
path("admin/", admin.site.urls),
path("", index_view),
]
5 changes: 5 additions & 0 deletions application/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.http import HttpResponse


def index_view(request):
return HttpResponse("It's working!")
23 changes: 23 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,26 @@ services:
- "./:/app"
ports:
- "5000:5000"
depends_on:
- "db"
- "rabbitmq"
env_file:
- ".env"

db:
image: "postgres:12.2-alpine"
restart: "always"
volumes:
- "./docker/.data/postgres:/var/lib/postgresql/data"
env_file:
- ".env"

rabbitmq:
image: "rabbitmq:3.8-management-alpine"
ports:
- "5672:5672"
- "15672:15672"
volumes:
- "./docker/.data/rabbitmq:/var/lib/rabbitmq"
env_file:
- ".env"
2 changes: 1 addition & 1 deletion docker/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

heroku local:start web
heroku local:start

0 comments on commit f9f3af0

Please sign in to comment.