Skip to content
Open
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
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Build Stage 1
# This build created a staging docker image
#
FROM node:10.15.2-alpine AS appbuild
WORKDIR /usr/src/app
COPY package.json ./
RUN npm install
COPY . .
EXPOSE 3000
CMD npm start
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,21 @@ Access the page by going to localhost:3000
npm test
```

### How to run the server in Docker / Docker-compose

Build the container
```
docker-compose build
```

Run the application in Docker.

```
docker-compose up -d
```
The container will expose port 3000


---

### How it works
Expand Down
26 changes: 26 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: '3'
services:
vynchronize:
#image: vynchronize
build: .
container_name: vynchronize
deploy:
replicas: 1
restart_policy:
condition: any
environment:
- YT3_API_KEY
- DM_API_KEY
ports:
- 3000:3000
healthcheck:
interval: 1m30s
retries: 3
test:
- CMD
- curl
- -f
- http://localhost
timeout: 10s