Merge pull request #9 from gekitsuu/adding-docker

adding a working Dockerfile for local development and testing
This commit is contained in:
Michael Hall 2018-01-03 11:54:50 -05:00 committed by GitHub
commit d70435fdcc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 0 deletions

8
Dockerfile Normal file
View file

@ -0,0 +1,8 @@
FROM ubuntu:latest
EXPOSE 8000
RUN apt-get update && apt-get upgrade -y && apt-get install -y python3 python3-pip
COPY . /home/python
WORKDIR /home/python
RUN pip3 install -r requirements.txt
RUN python3 manage.py migrate
ENTRYPOINT python3 manage.py runserver 0.0.0.0:8000

View file

@ -21,6 +21,16 @@ To start running the service use the following commands:
`./env/bin/python manage.py runserver`
### Using the docker container
```
docker build -t get_together .
docker run -d --name get_together -p 8000:8000 get_together
docker exec -it get_together python3 manage.py createsuperuser
```
You can then connect to the container by going to localhost:8000
## Test Federation
You can import sample event data into your "Searchable" table with this command: