Skip to content

Commit

Permalink
Conform the use of docker images by implementing the use of environme…
Browse files Browse the repository at this point in the history
…nt variables for all options available to Docker images and start node on docker run automatically.
  • Loading branch information
schlagmichdoch committed Oct 28, 2023
1 parent b4e74c2 commit 750f543
Show file tree
Hide file tree
Showing 6 changed files with 419 additions and 307 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ No | Yes

**Self-Hosted Setup**
Proxy: Nginx | Apache2
Deployment: docker run | docker-compose | npm run start:prod
Deployment: docker run | docker compose | npm run start:prod
Version: v1.9.4

**Additional context**
Expand Down
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ RUN npm ci

COPY . .

# environment settings
ENV NODE_ENV="production"

EXPOSE 3000

HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD wget --quiet --tries=1 --spider http://localhost:3000 || exit 1

ENTRYPOINT ["node", "index.js"]
20 changes: 12 additions & 8 deletions docker-compose-coturn.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
version: "3"
services:
node:
image: "node:lts-alpine"
user: "node"
working_dir: /home/node/app
volumes:
- ./:/home/node/app
command: ash -c "npm i && npm run start:prod"
pairdrop:
image: "lscr.io/linuxserver/pairdrop:latest"
container_name: pairdrop
restart: unless-stopped
environment:
- PUID=1000 # UID to run the application as
- PGID=1000 # GID to run the application as
- WS_FALLBACK=false # Set to true to enable websocket fallback if the peer to peer WebRTC connection is not available to the client.
- RATE_LIMIT=false # Set to true to limit clients to 1000 requests per 5 min.
- RTC_CONFIG=false # Set to the path of a file that specifies the STUN/TURN servers.
- DEBUG_MODE=false # Set to true to debug container and peer connections.
- TZ=Etc/UTC # Time Zone
ports:
- "3000:3000"
- "127.0.0.1:3000:3000" # Web UI. Change the port number before the last colon e.g. `127.0.0.1:9000:3000`
coturn_server:
image: "coturn/coturn"
restart: always
Expand Down
20 changes: 12 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
version: "3"
services:
node:
image: "node:lts-alpine"
user: "node"
working_dir: /home/node/app
volumes:
- ./:/home/node/app
command: ash -c "npm i && npm run start:prod"
pairdrop:
image: "lscr.io/linuxserver/pairdrop:latest"
container_name: pairdrop
restart: unless-stopped
environment:
- PUID=1000 # UID to run the application as
- PGID=1000 # GID to run the application as
- WS_FALLBACK=false # Set to true to enable websocket fallback if the peer to peer WebRTC connection is not available to the client.
- RATE_LIMIT=false # Set to true to limit clients to 1000 requests per 5 min.
- RTC_CONFIG=false # Set to the path of a file that specifies the STUN/TURN servers.
- DEBUG_MODE=false # Set to true to debug container and peer connections.
- TZ=Etc/UTC # Time Zone
ports:
- "3000:3000"
- "127.0.0.1:3000:3000" # Web UI. Change the port number before the last colon e.g. `127.0.0.1:9000:3000`
Loading

0 comments on commit 750f543

Please sign in to comment.