Skip to content
This repository has been archived by the owner on Aug 24, 2019. It is now read-only.

Commit

Permalink
Add dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
onerciller committed Jan 1, 2019
1 parent 5e066d8 commit b549ba5
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ WORKDIR /api
COPY requirements.txt ./
RUN pip install -r requirements.txt
ADD . /api/
ENTRYPOINT python manage.py runserver 0.0.0.0:8000

EXPOSE 8000
21 changes: 21 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: '3'
services:
db:
image: 'mysql:5.7'
ports:
- "3307:3306"
environment:
MYSQL_ROOT_PASSWORD: factlist
MYSQL_DATABASE: factlist
MYSQL_USER: root
MYSQL_PASSWORD: factlist
api:
build: .
env_file: .env
command: /api/manage.py runserver 0.0.0.0:8000
volumes:
- .:/api
ports:
- '8000:8000'
redis:
image: 'redis:latest'
2 changes: 2 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/code/manage.py syncdb --noinput
/usr/local/bin/gunicorn config.wsgi:application -w 2 -b :8000

0 comments on commit b549ba5

Please sign in to comment.