Giter Site home page Giter Site logo

sveltekit-cbrn-spreading's Introduction

CBRN Spreading

ToDo

  • keep browser active if measure is running (prevent sleep mode)
  • import memplex
    • get spread form formula from memplex data to calculate the spread
  • admin page
    • login via env credentials
    • see all misisons
    • see all spreads
    • delete missions
    • delete spreads
    • delete measurements

Page Layout

Elements:

├── /
│   └── landing
├── commander/
│   ├── creates as a spread and manages units
│   ├── create/
│   │   └── creates a new spread
│   └── view/
│       └── view existing spread, see current units
├── units/   
│   ├── units with the crew for the measurement run
│   ├── continuous/
│   │   └── for crews with continuous measurement devices
│   └── spot/
│       └── for crews with spot measurement devices
└── api/
    ├── spread
    │   ├── calc
    │   ├── save
    ├── unit

Database

https://earthly.dev/blog/mongodb-docker/

# simply
docker run -d -p 27017:27017 --name mongo-cbrn mongo:4.2.21

docker exec -it mongo-cbrn bash

Inside the container

mongosh

db.getCollectionNames()

# to find all entries
db.<collectionName>.find()
# to filter 
db.<collectionName>.find({"key":"value"})
# find by id
db.documents.find({"_id":ObjectId("62b2f813b987409d15e17ad0")})
# delete all with this filter
db.<collectionName>.deleteMany({"a":3})

Docker Container

Container from docker with node image. Attention image is big!

FROM node:16

# Create app directory
WORKDIR /opt/app

# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY ./build/package.json ./

RUN npm install
# If you are building your code for production
# RUN npm ci --only=production

# Bundle app source
COPY ./build .

ENV MONGO=<mongodb>:27017
#ENV SSL_KEY=./config/server.key 
#ENV SSL_CERT=./config/server.crt

EXPOSE 3000
CMD [ "node", "server.js" ]
FROM alpine:3.16

RUN mkdir -p /app

WORKDIR /app
# order: less changing to often changing

COPY ./config/server.crt .
COPY ./config/server.key .
# COPY ./config/docker.toml ./local.toml
COPY ./dist/cbrn-spread_0-0-1 ./cbrn

ENV MONGO=127.0.0.1:27017
ENV SSL_KEY=./server.key
ENV SSL_CERT=./server.crt
ENV PORT=3000
ENV HOST=localhost
ENV ORIGIN=localhost

EXPOSE ${PORT}

ENTRYPOINT [ "/app/cbrn" ]

sveltekit-cbrn-spreading's People

Contributors

zorsin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.