File tree Expand file tree Collapse file tree 3 files changed +48
-0
lines changed Expand file tree Collapse file tree 3 files changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ FROM python:3.6.4-alpine3.7
2
+
3
+ # Prepare environment
4
+ RUN apk add --update git make gcc g++ python3-dev musl-dev postgresql-dev libuv-dev libffi-dev jpeg-dev zlib-dev
5
+
6
+ # Move to WORKDIR and copy files
7
+ WORKDIR /usr/src/app
8
+ ADD . .
9
+
10
+ # Install dependencies
11
+ RUN set -ex && \
12
+ pip install honcho && \
13
+ pip install -r requirements.txt
14
+
15
+ CMD ["honcho" , "start" ]
Original file line number Diff line number Diff line change
1
+ .PHONY : run
2
+
3
+ run :
4
+ docker-compose up
5
+
6
+ run-debug :
7
+ docker-compose run --services-ports pythonrio
8
+
9
+ migrate :
10
+ docker-compose exec pythonrio python3 manage.py migrate
11
+
Original file line number Diff line number Diff line change
1
+ version : ' 3'
2
+
3
+ services :
4
+ pythonrio-db :
5
+ image : postgres:10.2-alpine
6
+ ports :
7
+ - " 5432:5432"
8
+ environment :
9
+ - POSTGRES_USER=admin
10
+ - POSTGRES_PASSWORD=adminpass
11
+ - POSTGRES_DB=pythonrio
12
+
13
+ pythonrio :
14
+ build :
15
+ context : .
16
+ ports :
17
+ - " 5000:5000"
18
+ volumes :
19
+ - .:/usr/src/app
20
+ depends_on :
21
+ - pythonrio-db
22
+ env_file : .env
You can’t perform that action at this time.
0 commit comments