Skip to content
Merged
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
77 changes: 77 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Dependencies
node_modules
npm-debug.log
yarn-debug.log
yarn-error.log
.pnpm-debug.log
.npm

# Build outputs
build
dist
out
.next
.nuxt
.output
coverage

# Version control
.git
.gitignore
.gitattributes
.githooks
.github

# Environment and config
.env
.env.*
.npmrc
.yarnrc
.nvmrc
.editorconfig
*.env.local
*.env.development
*.env.test
*.env.production

# IDE and editors
.idea
.vscode
*.swp
*.swo
.DS_Store
*.sublime-*
.project
.settings

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Testing
coverage
.nyc_output
test-results

# Misc
.dockerignore
Dockerfile*
docker-compose*
README.md
LICENSE
CHANGELOG.md
.husky
.eslintrc*
.prettierrc*
.stylelintrc*
jest.config.*
*.md
*.yml
*.yaml
!package.json
!package-lock.json
!yarn.lock
!pnpm-lock.yaml
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release

on:
workflow_dispatch:

jobs:
release:
runs-on: ubuntu-latest

permissions:
contents: write
packages: write

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22'

- name: Install dependencies
run: npm install --dev

- name: Run semantic-release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
REPO_OWNER: "Local-Connectivity-Lab"
REPO_NAME: "ccn-coverage-docker"
TARGET_ARTIFACT_NAME: "ccn-coverage-api"
run: npx semantic-release
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ api-secret
npm-debug.log*
yarn-debug.log*
yarn-error.log*
ccn-coverage-api.log
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "models/ccn-coverage-models"]
path = models/ccn-coverage-models
url = https://github.com/Local-Connectivity-Lab/ccn-coverage-models.git
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.15.0
22.14.0
1 change: 1 addition & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"semi": true,
"tabWidth": 2,
"printWidth": 80,
"singleQuote": true,
Expand Down
59 changes: 59 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"branches": [
"main"
],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "angular",
"releaseRules": [
{
"type": "feat",
"release": "minor"
},
{
"type": "fix",
"release": "patch"
},
{
"type": "refactor",
"release": "patch"
},
{
"type": "perf",
"release": "patch"
},
{
"type": "build",
"release": "patch"
},
{
"type": "ci",
"release": "patch"
},
{
"type": "chore",
"release": "patch"
},
{
"type": "docs",
"release": "patch"
},
{
"type": "style",
"release": "patch"
}
]
}
],
"@semantic-release/release-notes-generator",
"@semantic-release/git",
"@semantic-release/github"
],
"prepare": [
"@semantic-release/changelog",
"./scripts/publish-version.js",
"@semantic-release/git"
]
}
2 changes: 1 addition & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ location /api {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://localhost:3000;
proxy_pass http://localhost:3000;
}
location /secure {
proxy_set_header X-Forwarded-For $remote_addr;
Expand Down
24 changes: 24 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Build stage
FROM node:22-alpine AS builder
WORKDIR /usr/src/app

COPY package*.json ./
COPY tsconfig.json ./

RUN npm ci

COPY src src

RUN npm run build

# Production stage
FROM node:22-alpine AS production

WORKDIR /usr/src/app
COPY --from=builder /usr/src/app/package*.json ./
RUN npm ci --production && npm cache clean --force
COPY --from=builder /usr/src/app/build ./build

EXPOSE 3000

CMD ["node", "build/src/index.js"]
Loading