File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # Origins you want to allow
1+ # Origins you want to allow, use * to allow all origins (not recommended for production)
22
3- ALLOWED_ORIGINS = <https://site1.com>,<https://site2.com>,...
3+ ALLOWED_ORIGINS = <https://site1.com>,<https://site2.com>,...
4+
5+ # Port the server will run on [OPTIONAL - default: 4444]
6+ PORT = 4444
Original file line number Diff line number Diff line change 1+ version : 2
2+ updates :
3+ - package-ecosystem : " npm"
4+ directory : " /"
5+ schedule :
6+ interval : " weekly"
7+ open-pull-requests-limit : 5
8+ commit-message :
9+ prefix : " deps"
Original file line number Diff line number Diff line change 1+ name : Build Docker Image
2+
3+ on :
4+ workflow_dispatch :
5+ release :
6+ types : [created]
7+
8+ jobs :
9+ build :
10+ runs-on : ubuntu-latest
11+
12+ permissions :
13+ contents : read
14+ packages : write
15+
16+ steps :
17+ - name : Checkout code
18+ uses : actions/checkout@v4
19+
20+ - name : Set up Docker Buildx
21+ uses : docker/setup-buildx-action@v3
22+
23+ - name : Login to GitHub Container Registry
24+ uses : docker/login-action@v3
25+ with :
26+ registry : ghcr.io
27+ username : ${{ github.actor }}
28+ password : ${{ secrets.GITHUB_TOKEN }}
29+
30+ - name : Docker meta
31+ id : meta
32+ uses : docker/metadata-action@v4
33+ with :
34+ images : ghcr.io/${{ github.repository }}
35+ tags : |
36+ type=ref,event=tag
37+ type=raw,value=latest,enable={{is_default_branch}}
38+
39+ - name : Build and push Docker image
40+ uses : docker/build-push-action@v6
41+ with :
42+ context : .
43+ push : true
44+ platforms : linux/amd64
45+ tags : ${{ steps.meta.outputs.tags }}
Original file line number Diff line number Diff line change 1+ FROM node:20-alpine
2+
3+ WORKDIR /app
4+
5+ # Install system dependencies
6+ RUN apk add --no-cache git netcat-openbsd
7+
8+ # Copy package files
9+ COPY package.json ./
10+
11+ RUN npm install
12+
13+ # Copy the rest
14+ COPY . .
15+
16+ # Start app
17+ CMD ["npm" , "start" ]
Original file line number Diff line number Diff line change 1+ services :
2+ app :
3+ build :
4+ context : .
5+ dockerfile : Dockerfile
6+ container_name : anime-api
7+ restart : unless-stopped
8+ env_file :
9+ - .env
10+ ports :
11+ - ' 4444:${PORT:-4444}'
You can’t perform that action at this time.
0 commit comments