Added nodejs docker support

This commit is contained in:
Oleg Lavrovsky 2017-03-28 22:28:33 +02:00
parent 67f1707cfe
commit 3d9823876a
3 changed files with 20 additions and 6 deletions

View file

@ -3,12 +3,6 @@ FROM python:3.6
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY package.json /usr/src/app/
RUN npm install
RUN npm install -g bower
COPY bower.json /usr/src/app/
RUN bower install
COPY requirements.txt /usr/src/app/
RUN pip install --no-cache-dir -r requirements.txt

13
.dockerfile-frontend Normal file
View file

@ -0,0 +1,13 @@
FROM node:6
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
RUN echo '{ "allow_root": true }' > /root/.bowerrc
COPY package.json /usr/src/app/
RUN npm install
RUN npm install -g bower
COPY bower.json /usr/src/app/
RUN bower install

View file

@ -5,6 +5,7 @@ web:
volumes:
- ./:/usr/src/app
links:
- frontend
- postgres
- elasticsearch
ports:
@ -15,6 +16,12 @@ web:
- DATABASE_URL=postgres://postgres:@postgres:5432/postgres
- ELASTICSEARCH_URL=http://elasticsearch:9200
- SECRET_KEY=notasecretreplaceme
frontend:
build: .
dockerfile: .dockerfile-frontend
volumes:
- ./:/usr/src/app
working_dir: /usr/src/app
postgres:
image: postgres
ports: