Rebase off master with updated Dockerfile
This commit is contained in:
parent
8906e0e7d8
commit
7e6d478a8b
3 changed files with 23 additions and 1 deletions
|
@ -20,6 +20,8 @@ COPY --from=builder /home/python /home/python
|
||||||
COPY --from=builder /lib /lib
|
COPY --from=builder /lib /lib
|
||||||
COPY --from=builder /usr/lib /usr/lib
|
COPY --from=builder /usr/lib /usr/lib
|
||||||
|
|
||||||
|
STOPSIGNAL SIGINT
|
||||||
ENTRYPOINT ["venv/bin/python"]
|
ENTRYPOINT ["venv/bin/python"]
|
||||||
ENV DJANGO_SETTINGS_MODULE=get_together.environ_settings
|
ENV DJANGO_SETTINGS_MODULE=get_together.environ_settings
|
||||||
CMD ["manage.py", "runserver", "0.0.0.0:8000"]
|
CMD ["manage.py", "runserver", "0.0.0.0:8000"]
|
||||||
|
|
||||||
|
|
|
@ -63,13 +63,19 @@ file):
|
||||||
|
|
||||||
`./env/bin/python manage.py load_cities cities15000.txt`
|
`./env/bin/python manage.py load_cities cities15000.txt`
|
||||||
|
|
||||||
### Using the docker container
|
### Using docker
|
||||||
```
|
```
|
||||||
docker build -t get_together .
|
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 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
|
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
|
You can then connect to the container by going to localhost:8000
|
||||||
|
|
||||||
## Test Federation
|
## Test Federation
|
||||||
|
|
14
docker-compose.yml
Normal file
14
docker-compose.yml
Normal 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
|
Loading…
Reference in a new issue