Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM python:3.6.4-alpine3.7

# Prepare environment
RUN apk add --update git make gcc g++ python3-dev musl-dev postgresql-dev libuv-dev libffi-dev jpeg-dev zlib-dev

# Move to WORKDIR and copy files
WORKDIR /usr/src/app
ADD . .

# Install dependencies
RUN set -ex && \
pip install honcho && \
pip install -r requirements.txt

CMD ["honcho", "start"]
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.PHONY: run

run:
docker-compose up

run-debug:
docker-compose run --services-ports pythonrio

migrate:
docker-compose exec pythonrio python3 manage.py migrate

22 changes: 22 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: '3'

services:
pythonrio-db:
image: postgres:10.2-alpine
ports:
- "5432:5432"
environment:
- POSTGRES_USER=admin
- POSTGRES_PASSWORD=adminpass
- POSTGRES_DB=pythonrio

pythonrio:
build:
context: .
ports:
- "5000:5000"
volumes:
- .:/usr/src/app
depends_on:
- pythonrio-db
env_file: .env