Server backend for Osteppy App - OSTEP that:
- Manage EoDs (End of Day).
- Check unintended open ports on research machines.
/eod
: submits an EoD. EoD can be re-submitted within one day, it'll replace the previous submitted EoD./eod :<icon>:
same as above but with custom Slack icon./add-to-eod
: add a single task to current EoD./remove-from-eod <index>
: remove a single task from current EoD (index starts from0
)./list-ports
: list registered ports on research machines./list-ports <domain>
: list registered ports on a specific domain (ex./list-ports sweden
).
The server uses Nest.JS to manage different modules:
/src/database
: manages database, currently used to store EoDs and port checking data./src/slack
: communicates with Slack server API./src/users
: manages RA profiles./src/system
: manages port checking.
- Clone the repo.
- Install dependencies via
npm i
. - Config environment variables from the example file
cp env.example .env
.COMPOSE_FILE=docker-compose.yml;production.yml
for running the server.COMPOSE_FILE=docker-compose.yml;development.yml
for developing the server.- Complete other fields based on the Slack workspace.
- Config registered open ports from the example file
cp /config_files/domains.example.json domains.json
.- Ports checking will automatically run every hour and post results on
PORT_CHECKER_CHANNEL
defined in.env
.
- Ports checking will automatically run every hour and post results on
- Run the server with
docker-compose up --build [-d]
(-d
for detach mode).- In development mode, only
database
container runs withdocker-compose
. Thenode.js
server runs seperately bynpm run start:dev
for convenience.
- In development mode, only
- Stop the server with
docker-compose down
.
- Slack API: https://api.slack.com/apps/ACQG3QHBJ
- Slack API Slash commands: https://api.slack.com/apps/ACQG3QHBJ/slash-commands
Osteppy
is hosted onspain.cdot.systems:/opt/Osteppy/
- Registered ports config is at
spain.cdot.systems:/opt/Osteppy/config_files/domains.json
- To change the ports, either modify the config file and re-run the server, or modify the config file INSIDE the running docker container and re-load the config via
localhost:<PORT>/system/load-domains
as defined in/src/system/system.controller.ts
(no need to re-run the server).
- Registered ports config is at