Rebase off master with updated Dockerfile

This commit is contained in:
Michael Hall 2018-08-19 11:59:03 -04:00
parent 8906e0e7d8
commit 7e6d478a8b
3 changed files with 23 additions and 1 deletions

View file

@ -20,6 +20,8 @@ COPY --from=builder /home/python /home/python
COPY --from=builder /lib /lib
COPY --from=builder /usr/lib /usr/lib
STOPSIGNAL SIGINT
ENTRYPOINT ["venv/bin/python"]
ENV DJANGO_SETTINGS_MODULE=get_together.environ_settings
CMD ["manage.py", "runserver", "0.0.0.0:8000"]

View file

@ -63,13 +63,19 @@ file):
`./env/bin/python manage.py load_cities cities15000.txt`
### Using the docker container
### Using docker
```
docker build -t get_together .
docker run -e "DEBUG_MODE=True" -e "SECRET_KEY=xxxxx" -e "ALLOWED_HOSTS=localhost,127.0.0.1" -d --name get_together -p 8000:8000 get_together
docker exec -it get_together python3 manage.py createsuperuser
```
### Using docker-compose
```
docker-compose up -d
docker-compose exec get_together python3 manage.py createsuperuser
```
You can then connect to the container by going to localhost:8000
## Test Federation

14
docker-compose.yml Normal file
View file

@ -0,0 +1,14 @@
version: '3'
services:
get_together:
build:
context: .
dockerfile: Dockerfile
stdin_open: true
tty: true
ports:
- "8000:8000"
environment:
- DEBUG_MODE=True
- SECRET_KEY=xxxxx
- ALLOWED_HOSTS=localhost,127.0.0.1