Skip to content

Commit b77e89d

Browse files
committed
Initial commit. Code splitted from the anomaly_detection repository.
0 parents  commit b77e89d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+11935
-0
lines changed

.dockerignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
**/node_modules
2+
**/dist
3+
.editorconfig
4+
.gitattributes
5+
.github
6+
.gitignore
7+
.gitlab-ci.yml
8+
.idea
9+
.pre-commit-config.yaml
10+
.readthedocs.yml
11+
.travis.yml
12+
venv
13+
.git
14+
.envs/

.editorconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue}]
2+
charset = utf-8
3+
indent_size = 2
4+
indent_style = space
5+
end_of_line = lf
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Create and publish a Docker image
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
- master
9+
- alpha
10+
- beta
11+
tags:
12+
- 'v*'
13+
14+
# Defines two custom environment variables for the workflow.
15+
# These are used for the Container registry domain, and a
16+
# name for the Docker image that this workflow builds.
17+
env:
18+
REGISTRY: ghcr.io
19+
IMAGE_NAME: ${{ github.repository }}
20+
21+
jobs:
22+
build-and-push-image:
23+
name: Build and push Docker image
24+
runs-on: ubuntu-latest
25+
# # Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
26+
permissions:
27+
contents: read
28+
packages: write
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v4
32+
33+
- name: Extract metadata (tags, labels) for Docker
34+
id: meta
35+
uses: docker/metadata-action@v5
36+
with:
37+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
38+
tags: |
39+
type=ref,event=branch
40+
type=ref,event=pr
41+
type=semver,pattern={{version}}
42+
type=semver,pattern={{major}}.{{minor}}
43+
type=semver,pattern={{major}}
44+
45+
- name: Set up Docker Buildx
46+
uses: docker/setup-buildx-action@v2
47+
48+
- name: Log in to the Container registry
49+
if: github.event_name != 'pull_request'
50+
uses: docker/login-action@v3
51+
with:
52+
registry: ${{ env.REGISTRY }}
53+
username: ${{ github.actor }}
54+
password: ${{ secrets.GITHUB_TOKEN }}
55+
56+
- name: Build and push Docker image
57+
uses: docker/build-push-action@v6
58+
with:
59+
context: .
60+
push: ${{ github.event_name != 'pull_request' }}
61+
tags: ${{ steps.meta.outputs.tags }}
62+
labels: ${{ steps.meta.outputs.labels }}
63+
platforms: linux/amd64
64+
cache-from: type=gha
65+
cache-to: type=gha,mode=max

.gitignore

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
.DS_Store
2+
.thumbs.db
3+
node_modules
4+
5+
# Quasar core related directories
6+
.quasar
7+
/dist
8+
/quasar.config.*.temporary.compiled*
9+
10+
# Cordova related directories and files
11+
/src-cordova/node_modules
12+
/src-cordova/platforms
13+
/src-cordova/plugins
14+
/src-cordova/www
15+
16+
# Capacitor related directories and files
17+
/src-capacitor/www
18+
/src-capacitor/node_modules
19+
20+
# Log files
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*
24+
25+
# Editor directories and files
26+
.idea
27+
*.suo
28+
*.ntvs*
29+
*.njsproj
30+
*.sln
31+
32+
# local .env files
33+
.env.local*
34+
35+
# VScode directories
36+
.vscode

.gitmodules

Whitespace-only changes.

.npmrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# pnpm-related options
2+
shamefully-hoist=true
3+
strict-peer-dependencies=false
4+
# to get the latest compatible packages when creating the project https://github.com/pnpm/pnpm/issues/6463
5+
resolution-mode=highest

.prettierrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"$schema": "https://json.schemastore.org/prettierrc",
3+
"singleQuote": true,
4+
"printWidth": 100
5+
}

Dockerfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Multi-sep build dockerfile
2+
# Phase 1 - Build
3+
FROM node:lts-alpine AS build-stage
4+
5+
WORKDIR /app
6+
7+
RUN apk add --no-cache git curl
8+
9+
COPY . .
10+
RUN npm install
11+
RUN npm run build
12+
13+
# Phase 2 - Serve
14+
FROM nginx:stable-alpine AS production-stage
15+
16+
LABEL org.opencontainers.image.source=https://github.com/Mosquito-Alert/metrics-frontend
17+
18+
HEALTHCHECK --interval=30s --retries=3 --timeout=5s CMD curl --fail http://localhost || exit 1
19+
EXPOSE 80
20+
21+
WORKDIR /app
22+
COPY --from=build-stage /app/dist/spa /app
23+
COPY nginx.conf /etc/nginx/nginx.conf

Dockerfile.dev

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM node:lts-alpine
2+
3+
# USER node
4+
5+
ARG APP_HOME=/usr/app
6+
7+
WORKDIR ${APP_HOME}
8+
9+
RUN apk add --no-cache git
10+
11+
# COPY ./package.json ./
12+
# RUN npm install
13+
COPY ./ ./
14+
RUN npm i -g @quasar/cli
15+
RUN npm i
16+
17+
CMD ["npm", "run", "dev"]

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Anomaly Detection Map (anomaly-detection-map)
2+
3+
Mosquito Alert anomaly detection
4+
5+
## Install the dependencies
6+
```bash
7+
yarn
8+
# or
9+
npm install
10+
```
11+
12+
### Start the app in development mode (hot-code reloading, error reporting, etc.)
13+
```bash
14+
quasar dev
15+
```
16+
17+
18+
### Lint the files
19+
```bash
20+
yarn lint
21+
# or
22+
npm run lint
23+
```
24+
25+
26+
### Format the files
27+
```bash
28+
yarn format
29+
# or
30+
npm run format
31+
```
32+
33+
34+
### Build the app for production
35+
```bash
36+
quasar build
37+
```
38+
39+
### Customize the configuration
40+
See [Configuring quasar.config.js](https://v2.quasar.dev/quasar-cli-vite/quasar-config-js).

0 commit comments

Comments
 (0)