forked from vasanthv/hello
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Dockerfile and docker-compose files
- Loading branch information
1 parent
da53c07
commit 68d7a32
Showing
4 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# git folder | ||
.git | ||
|
||
# NPM | ||
node_modules | ||
npm-debug.log | ||
|
||
# Testing | ||
.nyc_output | ||
|
||
# Mac | ||
.DS_Store | ||
|
||
# cache | ||
.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM node:14.9.0-alpine3.10 | ||
|
||
WORKDIR /app | ||
|
||
COPY package*.json ./ | ||
|
||
RUN npm install | ||
|
||
COPY . . | ||
|
||
EXPOSE 3000 | ||
CMD [ "node", "server.js" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
version: '3.7' | ||
|
||
services: | ||
## Container that proxies all trafic to the containers configured | ||
## with VIRTUAL_HOST | ||
nginx-proxy: | ||
image: jwilder/nginx-proxy | ||
container_name: nginx-proxy | ||
ports: | ||
- 80:80 | ||
- 443:443 | ||
volumes: | ||
- conf:/etc/nginx/conf.d | ||
- vhost:/etc/nginx/vhost.d | ||
- html:/usr/share/nginx/html | ||
- dhparam:/etc/nginx/dhparam | ||
- certs:/etc/nginx/certs:ro | ||
- /var/run/docker.sock:/tmp/docker.sock:ro | ||
## Container that generates SSL certificates with Let's Encrypt | ||
## for all containers with the LETSENCRYPT_HOST LETSENCRYPT_EMAIL | ||
## enviroment settings | ||
letsencrypt: | ||
image: jrcs/letsencrypt-nginx-proxy-companion | ||
container_name: nginx-proxy-le | ||
volumes: | ||
- conf:/etc/nginx/conf.d | ||
- vhost:/etc/nginx/vhost.d | ||
- html:/usr/share/nginx/html | ||
- dhparam:/etc/nginx/dhparam | ||
- certs:/etc/nginx/certs:rw | ||
- /var/run/docker.sock:/var/run/docker.sock:ro | ||
## App container exposing the port 3000 for the proxy | ||
talk: | ||
image: talk:latest | ||
build: | ||
context: . | ||
expose: | ||
- 3000 | ||
environment: | ||
- VIRTUAL_HOST=talk.vasanthv.com | ||
- LETSENCRYPT_HOST=talk.vasanthv.com | ||
- [email protected] | ||
volumes: | ||
conf: | ||
vhost: | ||
html: | ||
dhparam: | ||
certs: |