Browse Source

Development Docker.

feature/python-error-tracking
Drew Larson 9 years ago
parent
commit
0d9ec2f3af
  1. 14
      Dockerfile
  2. 15
      docker-compose.dev.yml
  3. 20
      docker-compose.yml

14
Dockerfile

@ -0,0 +1,14 @@
FROM python:3.5
RUN apt-get update
RUN apt-get install -y nodejs npm
RUN ln -s /usr/bin/nodejs /usr/bin/node
RUN mkdir /code
WORKDIR /code
RUN mkdir requirements
ADD bikeshop_project /code
COPY requirements /code/requirements
RUN pip install -r requirements/development.txt
RUN npm install
EXPOSE 8000:8000
EXPOSE 3000:3000
CMD python manage.py runserver 0.0.0.0:8000

15
docker-compose.dev.yml

@ -0,0 +1,15 @@
version: "2"
services:
workstand:
build:
context: ./Dockerfile
command: "bash -c 'npm run watch & python manage.py runserver 0.0.0.0:8000'"
ports:
- "8000:8000"
- "3000:3000"
volumes:
- ./bikeshop_project:/code
redis:
restart: always
db:
restart: always

20
docker-compose.yml

@ -0,0 +1,20 @@
version: "2"
services:
workstand:
image: bcbc/workstand
depends_on:
- redis
- db
links:
- redis
- db
redis:
image: redis:latest
db:
image: postgres:latest
volumes:
- pgdata:/var/lib/postgresql/data/
volumes:
pgdata:
external: false
Loading…
Cancel
Save