Added nodejs docker support
This commit is contained in:
parent
67f1707cfe
commit
3d9823876a
3 changed files with 20 additions and 6 deletions
|
@ -3,12 +3,6 @@ FROM python:3.6
|
||||||
RUN mkdir -p /usr/src/app
|
RUN mkdir -p /usr/src/app
|
||||||
WORKDIR /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/
|
COPY requirements.txt /usr/src/app/
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
|
|
13
.dockerfile-frontend
Normal file
13
.dockerfile-frontend
Normal 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
|
||||||
|
|
|
@ -5,6 +5,7 @@ web:
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/usr/src/app
|
- ./:/usr/src/app
|
||||||
links:
|
links:
|
||||||
|
- frontend
|
||||||
- postgres
|
- postgres
|
||||||
- elasticsearch
|
- elasticsearch
|
||||||
ports:
|
ports:
|
||||||
|
@ -15,6 +16,12 @@ web:
|
||||||
- DATABASE_URL=postgres://postgres:@postgres:5432/postgres
|
- DATABASE_URL=postgres://postgres:@postgres:5432/postgres
|
||||||
- ELASTICSEARCH_URL=http://elasticsearch:9200
|
- ELASTICSEARCH_URL=http://elasticsearch:9200
|
||||||
- SECRET_KEY=notasecretreplaceme
|
- SECRET_KEY=notasecretreplaceme
|
||||||
|
frontend:
|
||||||
|
build: .
|
||||||
|
dockerfile: .dockerfile-frontend
|
||||||
|
volumes:
|
||||||
|
- ./:/usr/src/app
|
||||||
|
working_dir: /usr/src/app
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres
|
image: postgres
|
||||||
ports:
|
ports:
|
||||||
|
|
Loading…
Reference in a new issue