Skip to content

Commit

Permalink
initial docker and docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
simplefxone committed Jun 6, 2019
1 parent 0e81117 commit f6c5899
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.git
.ipynb_checkpoints/*
/notebooks/*
/unused/*
Dockerfile
.DS_Store
.gitignore
README.md
env.*
/devops/*
node_modules

# To prevent storing dev/temporary container data
*.csv
/tmp/*
9 changes: 9 additions & 0 deletions Caddyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
:80 {
log stdout
errors
proxy / http://web:4100 {
header_upstream Host {host}
header_upstream X-Real-IP {remote}
}
#tls [email protected]
}
25 changes: 25 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM node:carbon


# Create app directory
WORKDIR /usr/src/app


# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./


RUN npm install
RUN npm build
# If you are building your code for production
# RUN npm install --only=production


# Bundle app source
COPY . .


EXPOSE 4200
CMD [ "npm", "start" ]
22 changes: 22 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: '2.1'
services:
proxy:
image: abiosoft/caddy
container_name: proxy
volumes:
- ./Caddyfile:/etc/Caddyfile
- ./.caddy:/root/.caddy
environment:
- ACME_AGREE=true
ports:
- 80:80
restart: always
links:
- web
depends_on:
- web
web:
build:
context: .
dockerfile: Dockerfile
restart: always

0 comments on commit f6c5899

Please sign in to comment.