1
0
mirror of https://github.com/fspc/workstand.git synced 2025-02-23 09:13:23 -05:00

Development Docker.

This commit is contained in:
Drew Larson 2016-07-08 10:04:42 -06:00
parent 82159596cc
commit 0d9ec2f3af
3 changed files with 49 additions and 0 deletions

14
Dockerfile Normal file
View File

@ -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 Normal file
View File

@ -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 Normal file
View File

@ -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