Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

81 fe docker #115

Merged
merged 3 commits into from
Dec 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,6 @@ config.js
.env
settings.cfg

Orchestration/docker-compose.yml

__pycache__/
22 changes: 13 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
# base image
FROM node:12.2.0-alpine
RUN npm install webpack webpack-cli -g

WORKDIR /tmp
COPY package.json /tmp/
RUN npm config set registry http://registry.npmjs.org/ && npm install

# set working directory
WORKDIR /app
COPY . /app/
RUN cp -a /tmp/node_modules /app/

# add `/app/node_modules/.bin` to $PATH
ENV PATH /app/node_modules/.bin:$PATH
RUN webpack

# install and cache app dependencies
COPY package.json /app/package.json
RUN npm install --silent
RUN npm install [email protected] -g --silent
ENV NODE_ENV=production
ENV PORT=8080
RUN ls
CMD [ "npm", "run-script", "dev" ]

# start app
CMD ["npm", "start"]
EXPOSE 8080
44 changes: 22 additions & 22 deletions Orchestration/docker-compose-default.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
version: '3.1'

services:
backend:
build:
context: ../python
image: 311-data-back:0.0.1
restart: always
container_name: "311-backend"
environment:
SODAPY_APPTOKEN: <Your Token Here>
ports:
- 5000:5000

frontend:
build:
context: ../javascript/react/311-data
image: 311-data-front:0.0.1
volumes:
- '../javascript/react/311-data:/app'
- '/app/node_modules'
restart: always
container_name: "311-frontend"
ports:
- 3000:3000
# backend:
# build:
# context: ../python
# image: 311-data-back:0.0.1
# restart: always
# container_name: "311-backend"
# environment:
# SODAPY_APPTOKEN: <Your Token Here>
# ports:
# - 5000:5000
#
# frontend:
# build:
# context: ../javascript/react/311-data
# image: 311-data-front:0.0.1
# volumes:
# - '../javascript/react/311-data:/app'
# - '/app/node_modules'
# restart: always
# container_name: "311-frontend"
# ports:
# - 3000:3000

db:
image: postgres
Expand Down