Skip to content

Commit 0b684eb

Browse files
committed
chore: add ci
1 parent 774a967 commit 0b684eb

4 files changed

Lines changed: 61 additions & 5859 deletions

File tree

.github/workflows/ci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Build Docker Image
2+
on:
3+
push:
4+
branches:
5+
- master
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
cancel-in-progress: true
9+
jobs:
10+
build-and-push:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v3
15+
with:
16+
submodules: true
17+
- name: Set up Docker Buildx
18+
uses: docker/setup-buildx-action@v2
19+
- name: Login to DockerHub
20+
uses: docker/login-action@v2
21+
with:
22+
username: ${{ secrets.DOCKERHUB_USERNAME }}
23+
password: ${{ secrets.DOCKERHUB_TOKEN }}
24+
- name: Build and Push Image
25+
uses: docker/build-push-action@v3
26+
with:
27+
context: .
28+
push: true
29+
tags: |
30+
${{ secrets.DOCKERHUB_USERNAME }}/rankland-broadcast-hub:latest

Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM algoux/nodebase:16
2+
3+
WORKDIR /app
4+
5+
RUN npm install -g pnpm@^8.0.0
6+
COPY package.json pnpm-lock.yaml ./
7+
RUN pnpm install --frozen-lockfile
8+
COPY . .
9+
RUN pnpm run build
10+
11+
ENV PATH="/app/node_modules/pm2/bin:${PATH}"
12+
CMD npm run deploy:foreground

compose-template.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: '3'
2+
services:
3+
be:
4+
image: algoux/rankland-broadcast-hub:latest
5+
network_mode: host
6+
restart: unless-stopped
7+
container_name: rankland-broadcast-hub
8+
environment:
9+
- SERVER_HOST=127.0.0.1
10+
- SERVER_PORT=3001
11+
- NODE_WORKERS=1
12+
- REDIS_HOST=127.0.0.1
13+
- REDIS_PORT=6379
14+
- REDIS_PASS=
15+
- REDIS_DB=0
16+
- AUTH_TOKEN=your-auth-token
17+
- PUBLIC_IP=your-public-ip
18+
volumes:
19+
- /your-logs-path/rankland-broadcast-hub:/root/.pm2/logs

0 commit comments

Comments
 (0)