Skip to content

Commit

Permalink
feat: add dockerfile and docker compose (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
d-roak authored Jun 23, 2024
1 parent 2f4c127 commit 66b89ba
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 6 deletions.
25 changes: 25 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
services:
proxy:
image: valian/docker-nginx-auto-ssl
restart: on-failure
ports:
- 80:80
- 443:443
volumes:
- ssl_data:/etc/resty-auto-ssl
environment:
FORCE_HTTPS: true
SITES: relay.domain.com=relay:50000
depends_on:
- relay

relay:
build:
context: packages/node
dockerfile: Dockerfile
ports:
- 50000:50000
command: relay

volumes:
ssl_data:
8 changes: 8 additions & 0 deletions packages/node/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM node:22.3-bookworm-slim

WORKDIR /node
COPY . .

RUN chmod +x /node/entrypoint.sh

ENTRYPOINT ["/bin/bash", "/node/entrypoint.sh"]
3 changes: 3 additions & 0 deletions packages/node/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
yarn
exec yarn run "$@"
9 changes: 3 additions & 6 deletions packages/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@
},
"type": "module",
"types": "./dist/src/index.d.ts",
"files": [
"src",
"dist",
"!dist/test",
"!**/*.tsbuildinfo"
],
"files": ["src", "dist", "!dist/test", "!**/*.tsbuildinfo"],
"exports": {
".": {
"types": "./dist/src/index.d.ts",
Expand All @@ -30,7 +25,9 @@
"test": "vitest"
},
"devDependencies": {
"@types/node": "^20.14.2",
"tsx": "^4.15.6",
"typescript": "^5.4.5",
"vitest": "^1.6.0"
},
"dependencies": {
Expand Down

0 comments on commit 66b89ba

Please sign in to comment.