mirror of
https://github.com/ION606/learn.git
synced 2026-05-14 21:06:56 +00:00
initial commit
This commit is contained in:
+132
@@ -0,0 +1,132 @@
|
|||||||
|
# Logs
|
||||||
|
logs
|
||||||
|
*.log
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
lerna-debug.log*
|
||||||
|
.pnpm-debug.log*
|
||||||
|
|
||||||
|
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||||
|
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||||
|
|
||||||
|
# Runtime data
|
||||||
|
pids
|
||||||
|
*.pid
|
||||||
|
*.seed
|
||||||
|
*.pid.lock
|
||||||
|
|
||||||
|
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||||
|
lib-cov
|
||||||
|
|
||||||
|
# Coverage directory used by tools like istanbul
|
||||||
|
coverage
|
||||||
|
*.lcov
|
||||||
|
|
||||||
|
# nyc test coverage
|
||||||
|
.nyc_output
|
||||||
|
|
||||||
|
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
||||||
|
.grunt
|
||||||
|
|
||||||
|
# Bower dependency directory (https://bower.io/)
|
||||||
|
bower_components
|
||||||
|
|
||||||
|
# node-waf configuration
|
||||||
|
.lock-wscript
|
||||||
|
|
||||||
|
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||||
|
build/Release
|
||||||
|
|
||||||
|
# Dependency directories
|
||||||
|
node_modules/
|
||||||
|
jspm_packages/
|
||||||
|
|
||||||
|
# Snowpack dependency directory (https://snowpack.dev/)
|
||||||
|
web_modules/
|
||||||
|
|
||||||
|
# TypeScript cache
|
||||||
|
*.tsbuildinfo
|
||||||
|
|
||||||
|
# Optional npm cache directory
|
||||||
|
.npm
|
||||||
|
|
||||||
|
# Optional eslint cache
|
||||||
|
.eslintcache
|
||||||
|
|
||||||
|
# Optional stylelint cache
|
||||||
|
.stylelintcache
|
||||||
|
|
||||||
|
# Microbundle cache
|
||||||
|
.rpt2_cache/
|
||||||
|
.rts2_cache_cjs/
|
||||||
|
.rts2_cache_es/
|
||||||
|
.rts2_cache_umd/
|
||||||
|
|
||||||
|
# Optional REPL history
|
||||||
|
.node_repl_history
|
||||||
|
|
||||||
|
# Output of 'npm pack'
|
||||||
|
*.tgz
|
||||||
|
|
||||||
|
# Yarn Integrity file
|
||||||
|
.yarn-integrity
|
||||||
|
|
||||||
|
# dotenv environment variable files
|
||||||
|
.env
|
||||||
|
.env.development.local
|
||||||
|
.env.test.local
|
||||||
|
.env.production.local
|
||||||
|
.env.local
|
||||||
|
|
||||||
|
# parcel-bundler cache (https://parceljs.org/)
|
||||||
|
.cache
|
||||||
|
.parcel-cache
|
||||||
|
|
||||||
|
# Next.js build output
|
||||||
|
.next
|
||||||
|
out
|
||||||
|
|
||||||
|
# Nuxt.js build / generate output
|
||||||
|
.nuxt
|
||||||
|
dist
|
||||||
|
|
||||||
|
# Gatsby files
|
||||||
|
.cache/
|
||||||
|
# Comment in the public line in if your project uses Gatsby and not Next.js
|
||||||
|
# https://nextjs.org/blog/next-9-1#public-directory-support
|
||||||
|
# public
|
||||||
|
|
||||||
|
# vuepress build output
|
||||||
|
.vuepress/dist
|
||||||
|
|
||||||
|
# vuepress v2.x temp and cache directory
|
||||||
|
.temp
|
||||||
|
.cache
|
||||||
|
|
||||||
|
# Docusaurus cache and generated files
|
||||||
|
.docusaurus
|
||||||
|
|
||||||
|
# Serverless directories
|
||||||
|
.serverless/
|
||||||
|
|
||||||
|
# FuseBox cache
|
||||||
|
.fusebox/
|
||||||
|
|
||||||
|
# DynamoDB Local files
|
||||||
|
.dynamodb/
|
||||||
|
|
||||||
|
# TernJS port file
|
||||||
|
.tern-port
|
||||||
|
|
||||||
|
# Stores VSCode versions used for testing VSCode extensions
|
||||||
|
.vscode-test
|
||||||
|
|
||||||
|
# yarn v2
|
||||||
|
.yarn/cache
|
||||||
|
.yarn/unplugged
|
||||||
|
.yarn/build-state.yml
|
||||||
|
.yarn/install-state.gz
|
||||||
|
.pnp.*
|
||||||
|
|
||||||
|
all.zip
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
+57344
File diff suppressed because one or more lines are too long
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,147 @@
|
|||||||
|
/* mutex-example.c */
|
||||||
|
|
||||||
|
/* multi-threaded example showing multiple threads adding to
|
||||||
|
* a shared set of global variables
|
||||||
|
*
|
||||||
|
* specifically, thread A sums 1 + 2 + ... + a, whereas
|
||||||
|
* thread B sums 1 + 2 + ... + b
|
||||||
|
*
|
||||||
|
* both threads A and B add to global_sum, which should
|
||||||
|
* then be 1 + 2 + ... + a + 1 + 2 + ... + b
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <pthread.h>
|
||||||
|
|
||||||
|
/* shared global variables */
|
||||||
|
int global_a; /* sum: 1 + 2 + ... + a */
|
||||||
|
int global_b; /* sum: 1 + 2 + ... + b */
|
||||||
|
int global_sum; /* global_a + global_b */
|
||||||
|
|
||||||
|
/* function prototypes for the thread functions */
|
||||||
|
void * whattodo_for_a( void * arg );
|
||||||
|
void * whattodo_for_b( void * arg );
|
||||||
|
void * noise( void * arg );
|
||||||
|
|
||||||
|
/* global mutex variables */
|
||||||
|
pthread_mutex_t mutex_on_global_sum = PTHREAD_MUTEX_INITIALIZER;
|
||||||
|
|
||||||
|
int main( int argc, char * argv[] )
|
||||||
|
{
|
||||||
|
if ( argc != 3 )
|
||||||
|
{
|
||||||
|
fprintf( stderr, "ERROR: Invalid input(s)\n" );
|
||||||
|
fprintf( stderr, "USAGE: a.out <a> <b>\n" );
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
int a = atoi( argv[1] );
|
||||||
|
int b = atoi( argv[2] );
|
||||||
|
|
||||||
|
int expected_sum_a = 0;
|
||||||
|
for ( int i = 1 ; i <= a ; i++ ) expected_sum_a += i;
|
||||||
|
|
||||||
|
int expected_sum_b = 0;
|
||||||
|
for ( int i = 1 ; i <= b ; i++ ) expected_sum_b += i;
|
||||||
|
|
||||||
|
int expected_global_sum = expected_sum_a + expected_sum_b;
|
||||||
|
|
||||||
|
|
||||||
|
global_sum = global_a = global_b = 0;
|
||||||
|
|
||||||
|
pthread_t tid1, tid2, tid3;
|
||||||
|
int rc;
|
||||||
|
|
||||||
|
rc = pthread_create( &tid1, NULL, whattodo_for_a, &a );
|
||||||
|
if ( rc != 0 ) { fprintf( stderr, "pthread_create() failed (%d)\n", rc ); return EXIT_FAILURE; }
|
||||||
|
|
||||||
|
rc = pthread_create( &tid2, NULL, whattodo_for_b, &b );
|
||||||
|
if ( rc != 0 ) { fprintf( stderr, "pthread_create() failed (%d)\n", rc ); return EXIT_FAILURE; }
|
||||||
|
|
||||||
|
/* TO DO: add a third call to pthread_create() and have that
|
||||||
|
* child thread call whattodo_for_b(), which then will
|
||||||
|
* require synchronization on global_b...
|
||||||
|
*/
|
||||||
|
|
||||||
|
rc = pthread_create( &tid3, NULL, noise, NULL );
|
||||||
|
|
||||||
|
|
||||||
|
rc = pthread_join( tid1, NULL );
|
||||||
|
if ( rc != 0 ) { fprintf( stderr, "pthread_join() failed (%d)\n", rc ); return EXIT_FAILURE; }
|
||||||
|
|
||||||
|
rc = pthread_join( tid2, NULL );
|
||||||
|
if ( rc != 0 ) { fprintf( stderr, "pthread_join() failed (%d)\n", rc ); return EXIT_FAILURE; }
|
||||||
|
|
||||||
|
/* no overlap in individual writes/updates to global_a */
|
||||||
|
printf( "MAIN: global a is %d (expected %d)%s\n", global_a, expected_sum_a,
|
||||||
|
global_a != expected_sum_a ? " **************" : "" );
|
||||||
|
|
||||||
|
/* no overlap in individual writes/updates to global_b */
|
||||||
|
printf( "MAIN: global b is %d (expected %d)%s\n", global_b, expected_sum_b,
|
||||||
|
global_b != expected_sum_b ? " **************" : "" );
|
||||||
|
|
||||||
|
/* potential overlap in individual writes/updates to global_sum */
|
||||||
|
printf( "MAIN: global sum is %d (expected %d)%s\n", global_sum, expected_global_sum,
|
||||||
|
global_sum != expected_global_sum ? " **************" : "" );
|
||||||
|
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void * whattodo_for_a( void * arg )
|
||||||
|
{
|
||||||
|
int a = *(int *)arg;
|
||||||
|
|
||||||
|
for ( int i = 1 ; i <= a ; i++ )
|
||||||
|
{
|
||||||
|
printf( "Thread A: adding %d to global_a\n", i );
|
||||||
|
global_a += i;
|
||||||
|
|
||||||
|
printf( "Thread A: adding %d to global_sum\n", i );
|
||||||
|
|
||||||
|
pthread_mutex_lock( &mutex_on_global_sum );
|
||||||
|
{
|
||||||
|
global_sum += i; /* CRITICAL SECTION */
|
||||||
|
}
|
||||||
|
pthread_mutex_unlock( &mutex_on_global_sum );
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void * whattodo_for_b( void * arg )
|
||||||
|
{
|
||||||
|
int b = *(int *)arg;
|
||||||
|
|
||||||
|
for ( int i = 1 ; i <= b ; i++ )
|
||||||
|
{
|
||||||
|
printf( "Thread B: adding %d to global_b\n", i );
|
||||||
|
global_b += i;
|
||||||
|
|
||||||
|
printf( "Thread B: adding %d to global_sum\n", i );
|
||||||
|
|
||||||
|
pthread_mutex_lock( &mutex_on_global_sum );
|
||||||
|
{
|
||||||
|
global_sum += i; /* CRITICAL SECTION */
|
||||||
|
}
|
||||||
|
pthread_mutex_unlock( &mutex_on_global_sum );
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void * noise( void * arg )
|
||||||
|
{
|
||||||
|
for ( int i = 1 ; i <= 1000 ; i++ )
|
||||||
|
{
|
||||||
|
usleep( 100 );
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/wait.h>
|
||||||
|
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
int pipefd[2];
|
||||||
|
int rc = pipe(pipefd);
|
||||||
|
|
||||||
|
if (rc == -1) {
|
||||||
|
perror("pipe() failed!");
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
pid_t pid = fork();
|
||||||
|
|
||||||
|
if (pid == 0) {
|
||||||
|
perror("fork() failed!");
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pid == 0) {
|
||||||
|
// close the read end of the pipe (there's no need to use it in this process)
|
||||||
|
close(pipefd[0]);
|
||||||
|
|
||||||
|
// Write the bytes to the pipe
|
||||||
|
char* toWrite = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||||
|
int bytes_written = write(pipefd[1], toWrite, 26);
|
||||||
|
printf("Child process wrote \"%s\" (%d bytes)\n", toWrite, bytes_written);
|
||||||
|
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// close the write end of the pipe (there's no need to use it in this process)
|
||||||
|
close(pipefd[0]);
|
||||||
|
|
||||||
|
int stat;
|
||||||
|
pid_t cpid = waitpid(pid, &stat, 0);
|
||||||
|
|
||||||
|
printf("child exited with status %d\n", WEXITSTATUS(stat));
|
||||||
|
|
||||||
|
char buffer[20];
|
||||||
|
int bytes_read = read(pipefd[0], buffer, 10);
|
||||||
|
|
||||||
|
// assume the data is char data
|
||||||
|
buffer[bytes_read] = '\0';
|
||||||
|
|
||||||
|
printf("Parent process read \"%s\" (%d bytes)\n", buffer, bytes_read);
|
||||||
|
|
||||||
|
// close the write buffer
|
||||||
|
close(pipefd[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,11 @@
|
|||||||
|
# Welcome to my notes!
|
||||||
|
Feel free to browse for anything you like!
|
||||||
|
|
||||||
|
if you have any topics you'd like me to cover, please open an issue with the `new` tag
|
||||||
|
|
||||||
|
if you find an error, please open an issue with the `error` tag
|
||||||
|
|
||||||
|
|
||||||
|
# Notes
|
||||||
|
1. There are other classes who's notes I can't release because I was dumb and stored them locally on a PC that decided to die
|
||||||
|
2. Homeworks/labs ***MAY*** be uploaded after graduation
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
# Keywords
|
||||||
|
|
||||||
|
## FROM (module)
|
||||||
|
* gives instructions about the base platform to use (node, fedora, etc)
|
||||||
|
- `FROM node:20`
|
||||||
|
|
||||||
|
|
||||||
|
## WORKDIR (path)
|
||||||
|
* like when you `cd` into a directory
|
||||||
|
* makes sure any commands executed will be in this directory
|
||||||
|
- `WORKDIR /app`
|
||||||
|
|
||||||
|
|
||||||
|
## COPY (src) (dest)
|
||||||
|
* copies files from `src` to `dest`
|
||||||
|
* I THINK it's like a symbolic link? Maybe?
|
||||||
|
- `COPY package*.json ./`
|
||||||
|
|
||||||
|
*Note: you can get docker to ignore files by creating a `.dockerignore` file*
|
||||||
|
|
||||||
|
|
||||||
|
## RUN (commands)
|
||||||
|
* like running a command in the terminal!
|
||||||
|
* `RUN npm install`
|
||||||
|
|
||||||
|
|
||||||
|
## ENV ((varName=varVal) (varName2=varVal2) ...)
|
||||||
|
* sets env vars (like doing it from the command line)
|
||||||
|
- `ENV PORT=3000`
|
||||||
|
|
||||||
|
|
||||||
|
## EXPOSE (PORT)
|
||||||
|
* this will expose a port to the network
|
||||||
|
- `EXPOSE 3000`
|
||||||
|
|
||||||
|
|
||||||
|
## CMD (args[])
|
||||||
|
* only ONE per dockerfile
|
||||||
|
* will tell the container how to run the application
|
||||||
|
* same as nodejs `spawn` args
|
||||||
|
- `CMD ["npm", "start"]`
|
||||||
|
|
||||||
|
|
||||||
|
# Notes
|
||||||
|
every step/instruction in docker is it's own layer
|
||||||
|
- docker attempts to cache layers if nothing is changes
|
||||||
|
- this means we want to install dependancies first so they aren't re-installed every time (i.e. are cached)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
node_modules
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
FROM node
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY package*.json ./
|
||||||
|
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
ENV PORT=3000
|
||||||
|
|
||||||
|
EXPOSE 3000
|
||||||
|
|
||||||
|
CMD ["node", "."]
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
# Docker Compose
|
||||||
|
allows running of multiple containers/volumes
|
||||||
|
|
||||||
|
|
||||||
|
## Creating
|
||||||
|
create a `docker-compose.yaml` file in the root dir of the project
|
||||||
|
|
||||||
|
|
||||||
|
## Running
|
||||||
|
use `docker-compose up`
|
||||||
|
|
||||||
|
|
||||||
|
## Sections
|
||||||
|
|
||||||
|
### Version
|
||||||
|
a version number (i.e. `version: '3'`)
|
||||||
|
|
||||||
|
### services
|
||||||
|
this is the section containing the different things you want to run
|
||||||
|
for example, if you want to runa web app, and then sql db you would use:
|
||||||
|
```dockerfile
|
||||||
|
services:
|
||||||
|
web:
|
||||||
|
build: .
|
||||||
|
ports:
|
||||||
|
- "3000:3000"
|
||||||
|
db:
|
||||||
|
image: "mysql"
|
||||||
|
environment:
|
||||||
|
# env vars here
|
||||||
|
ROOT_PASS: password
|
||||||
|
volumes:
|
||||||
|
-db-data:/foo
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
-db-data:/foo
|
||||||
|
```
|
||||||
|
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
services:
|
||||||
|
web:
|
||||||
|
build: .
|
||||||
|
ports:
|
||||||
|
- "3000:3000"
|
||||||
|
db:
|
||||||
|
image: "mysql"
|
||||||
|
environment:
|
||||||
|
# env vars here
|
||||||
|
ROOT_PASS: password
|
||||||
|
volumes:
|
||||||
|
- db-data:/foo
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
db-data:
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
const app = require('express')();
|
||||||
|
app.get('/', (req, res) => {
|
||||||
|
res.json({ message: "UWU" })
|
||||||
|
});
|
||||||
|
const port = process.env.PORT || 3000;
|
||||||
|
app.listen(port, () => console.log(`app listening on port ${port}`));
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
build_and_run:
|
||||||
|
sudo docker build -t ion606/img .
|
||||||
|
sudo docker run ion606/img -p 5000:3000
|
||||||
|
|
||||||
|
build_and_run_with_mem:
|
||||||
|
sudo docker build -t ion606/img .
|
||||||
|
sudo docker volume create shared_mem
|
||||||
|
sudo docker run -p 5000:3000 --mount source=shared_mem,target=/shredmem ion606/img
|
||||||
|
|
||||||
|
compose:
|
||||||
|
docker compose up
|
||||||
|
|
||||||
|
stopall:
|
||||||
|
docker stop $(docker ps -a -q)
|
||||||
Generated
+694
@@ -0,0 +1,694 @@
|
|||||||
|
{
|
||||||
|
"name": "example_dockerfile",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"lockfileVersion": 3,
|
||||||
|
"requires": true,
|
||||||
|
"packages": {
|
||||||
|
"": {
|
||||||
|
"name": "example_dockerfile",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"express": "^4.19.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/accepts": {
|
||||||
|
"version": "1.3.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
|
||||||
|
"integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
|
||||||
|
"dependencies": {
|
||||||
|
"mime-types": "~2.1.34",
|
||||||
|
"negotiator": "0.6.3"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/array-flatten": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg=="
|
||||||
|
},
|
||||||
|
"node_modules/body-parser": {
|
||||||
|
"version": "1.20.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz",
|
||||||
|
"integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==",
|
||||||
|
"dependencies": {
|
||||||
|
"bytes": "3.1.2",
|
||||||
|
"content-type": "~1.0.5",
|
||||||
|
"debug": "2.6.9",
|
||||||
|
"depd": "2.0.0",
|
||||||
|
"destroy": "1.2.0",
|
||||||
|
"http-errors": "2.0.0",
|
||||||
|
"iconv-lite": "0.4.24",
|
||||||
|
"on-finished": "2.4.1",
|
||||||
|
"qs": "6.11.0",
|
||||||
|
"raw-body": "2.5.2",
|
||||||
|
"type-is": "~1.6.18",
|
||||||
|
"unpipe": "1.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8",
|
||||||
|
"npm": "1.2.8000 || >= 1.4.16"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/bytes": {
|
||||||
|
"version": "3.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
|
||||||
|
"integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/call-bind": {
|
||||||
|
"version": "1.0.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz",
|
||||||
|
"integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==",
|
||||||
|
"dependencies": {
|
||||||
|
"es-define-property": "^1.0.0",
|
||||||
|
"es-errors": "^1.3.0",
|
||||||
|
"function-bind": "^1.1.2",
|
||||||
|
"get-intrinsic": "^1.2.4",
|
||||||
|
"set-function-length": "^1.2.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/content-disposition": {
|
||||||
|
"version": "0.5.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
|
||||||
|
"integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
|
||||||
|
"dependencies": {
|
||||||
|
"safe-buffer": "5.2.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/content-type": {
|
||||||
|
"version": "1.0.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
|
||||||
|
"integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/cookie": {
|
||||||
|
"version": "0.6.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz",
|
||||||
|
"integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/cookie-signature": {
|
||||||
|
"version": "1.0.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
|
||||||
|
"integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ=="
|
||||||
|
},
|
||||||
|
"node_modules/debug": {
|
||||||
|
"version": "2.6.9",
|
||||||
|
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||||
|
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||||
|
"dependencies": {
|
||||||
|
"ms": "2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/define-data-property": {
|
||||||
|
"version": "1.1.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz",
|
||||||
|
"integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",
|
||||||
|
"dependencies": {
|
||||||
|
"es-define-property": "^1.0.0",
|
||||||
|
"es-errors": "^1.3.0",
|
||||||
|
"gopd": "^1.0.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/depd": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/destroy": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8",
|
||||||
|
"npm": "1.2.8000 || >= 1.4.16"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/ee-first": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
|
||||||
|
},
|
||||||
|
"node_modules/encodeurl": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
|
||||||
|
"integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/es-define-property": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==",
|
||||||
|
"dependencies": {
|
||||||
|
"get-intrinsic": "^1.2.4"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/es-errors": {
|
||||||
|
"version": "1.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
|
||||||
|
"integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/escape-html": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
|
||||||
|
"integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="
|
||||||
|
},
|
||||||
|
"node_modules/etag": {
|
||||||
|
"version": "1.8.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
|
||||||
|
"integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/express": {
|
||||||
|
"version": "4.19.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz",
|
||||||
|
"integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==",
|
||||||
|
"dependencies": {
|
||||||
|
"accepts": "~1.3.8",
|
||||||
|
"array-flatten": "1.1.1",
|
||||||
|
"body-parser": "1.20.2",
|
||||||
|
"content-disposition": "0.5.4",
|
||||||
|
"content-type": "~1.0.4",
|
||||||
|
"cookie": "0.6.0",
|
||||||
|
"cookie-signature": "1.0.6",
|
||||||
|
"debug": "2.6.9",
|
||||||
|
"depd": "2.0.0",
|
||||||
|
"encodeurl": "~1.0.2",
|
||||||
|
"escape-html": "~1.0.3",
|
||||||
|
"etag": "~1.8.1",
|
||||||
|
"finalhandler": "1.2.0",
|
||||||
|
"fresh": "0.5.2",
|
||||||
|
"http-errors": "2.0.0",
|
||||||
|
"merge-descriptors": "1.0.1",
|
||||||
|
"methods": "~1.1.2",
|
||||||
|
"on-finished": "2.4.1",
|
||||||
|
"parseurl": "~1.3.3",
|
||||||
|
"path-to-regexp": "0.1.7",
|
||||||
|
"proxy-addr": "~2.0.7",
|
||||||
|
"qs": "6.11.0",
|
||||||
|
"range-parser": "~1.2.1",
|
||||||
|
"safe-buffer": "5.2.1",
|
||||||
|
"send": "0.18.0",
|
||||||
|
"serve-static": "1.15.0",
|
||||||
|
"setprototypeof": "1.2.0",
|
||||||
|
"statuses": "2.0.1",
|
||||||
|
"type-is": "~1.6.18",
|
||||||
|
"utils-merge": "1.0.1",
|
||||||
|
"vary": "~1.1.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/finalhandler": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==",
|
||||||
|
"dependencies": {
|
||||||
|
"debug": "2.6.9",
|
||||||
|
"encodeurl": "~1.0.2",
|
||||||
|
"escape-html": "~1.0.3",
|
||||||
|
"on-finished": "2.4.1",
|
||||||
|
"parseurl": "~1.3.3",
|
||||||
|
"statuses": "2.0.1",
|
||||||
|
"unpipe": "~1.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/forwarded": {
|
||||||
|
"version": "0.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
|
||||||
|
"integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/fresh": {
|
||||||
|
"version": "0.5.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
|
||||||
|
"integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/function-bind": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
|
||||||
|
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/get-intrinsic": {
|
||||||
|
"version": "1.2.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz",
|
||||||
|
"integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==",
|
||||||
|
"dependencies": {
|
||||||
|
"es-errors": "^1.3.0",
|
||||||
|
"function-bind": "^1.1.2",
|
||||||
|
"has-proto": "^1.0.1",
|
||||||
|
"has-symbols": "^1.0.3",
|
||||||
|
"hasown": "^2.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/gopd": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
|
||||||
|
"integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==",
|
||||||
|
"dependencies": {
|
||||||
|
"get-intrinsic": "^1.1.3"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/has-property-descriptors": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",
|
||||||
|
"integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",
|
||||||
|
"dependencies": {
|
||||||
|
"es-define-property": "^1.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/has-proto": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz",
|
||||||
|
"integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/has-symbols": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
|
||||||
|
"integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/hasown": {
|
||||||
|
"version": "2.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
|
||||||
|
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
|
||||||
|
"dependencies": {
|
||||||
|
"function-bind": "^1.1.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/http-errors": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
|
||||||
|
"dependencies": {
|
||||||
|
"depd": "2.0.0",
|
||||||
|
"inherits": "2.0.4",
|
||||||
|
"setprototypeof": "1.2.0",
|
||||||
|
"statuses": "2.0.1",
|
||||||
|
"toidentifier": "1.0.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/iconv-lite": {
|
||||||
|
"version": "0.4.24",
|
||||||
|
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
|
||||||
|
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
|
||||||
|
"dependencies": {
|
||||||
|
"safer-buffer": ">= 2.1.2 < 3"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/inherits": {
|
||||||
|
"version": "2.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||||
|
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
||||||
|
},
|
||||||
|
"node_modules/ipaddr.js": {
|
||||||
|
"version": "1.9.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
|
||||||
|
"integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/media-typer": {
|
||||||
|
"version": "0.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
|
||||||
|
"integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/merge-descriptors": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
|
||||||
|
"integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w=="
|
||||||
|
},
|
||||||
|
"node_modules/methods": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
|
||||||
|
"integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/mime": {
|
||||||
|
"version": "1.6.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
|
||||||
|
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
|
||||||
|
"bin": {
|
||||||
|
"mime": "cli.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/mime-db": {
|
||||||
|
"version": "1.52.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
|
||||||
|
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/mime-types": {
|
||||||
|
"version": "2.1.35",
|
||||||
|
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
|
||||||
|
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
|
||||||
|
"dependencies": {
|
||||||
|
"mime-db": "1.52.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/ms": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
|
||||||
|
},
|
||||||
|
"node_modules/negotiator": {
|
||||||
|
"version": "0.6.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
|
||||||
|
"integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/object-inspect": {
|
||||||
|
"version": "1.13.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz",
|
||||||
|
"integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==",
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/on-finished": {
|
||||||
|
"version": "2.4.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
|
||||||
|
"integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
|
||||||
|
"dependencies": {
|
||||||
|
"ee-first": "1.1.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/parseurl": {
|
||||||
|
"version": "1.3.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
|
||||||
|
"integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/path-to-regexp": {
|
||||||
|
"version": "0.1.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
|
||||||
|
"integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ=="
|
||||||
|
},
|
||||||
|
"node_modules/proxy-addr": {
|
||||||
|
"version": "2.0.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
|
||||||
|
"integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
|
||||||
|
"dependencies": {
|
||||||
|
"forwarded": "0.2.0",
|
||||||
|
"ipaddr.js": "1.9.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/qs": {
|
||||||
|
"version": "6.11.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz",
|
||||||
|
"integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
|
||||||
|
"dependencies": {
|
||||||
|
"side-channel": "^1.0.4"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.6"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/range-parser": {
|
||||||
|
"version": "1.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
|
||||||
|
"integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/raw-body": {
|
||||||
|
"version": "2.5.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz",
|
||||||
|
"integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==",
|
||||||
|
"dependencies": {
|
||||||
|
"bytes": "3.1.2",
|
||||||
|
"http-errors": "2.0.0",
|
||||||
|
"iconv-lite": "0.4.24",
|
||||||
|
"unpipe": "1.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/safe-buffer": {
|
||||||
|
"version": "5.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
||||||
|
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"type": "github",
|
||||||
|
"url": "https://github.com/sponsors/feross"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "patreon",
|
||||||
|
"url": "https://www.patreon.com/feross"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "consulting",
|
||||||
|
"url": "https://feross.org/support"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"node_modules/safer-buffer": {
|
||||||
|
"version": "2.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
||||||
|
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
||||||
|
},
|
||||||
|
"node_modules/send": {
|
||||||
|
"version": "0.18.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz",
|
||||||
|
"integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==",
|
||||||
|
"dependencies": {
|
||||||
|
"debug": "2.6.9",
|
||||||
|
"depd": "2.0.0",
|
||||||
|
"destroy": "1.2.0",
|
||||||
|
"encodeurl": "~1.0.2",
|
||||||
|
"escape-html": "~1.0.3",
|
||||||
|
"etag": "~1.8.1",
|
||||||
|
"fresh": "0.5.2",
|
||||||
|
"http-errors": "2.0.0",
|
||||||
|
"mime": "1.6.0",
|
||||||
|
"ms": "2.1.3",
|
||||||
|
"on-finished": "2.4.1",
|
||||||
|
"range-parser": "~1.2.1",
|
||||||
|
"statuses": "2.0.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/send/node_modules/ms": {
|
||||||
|
"version": "2.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||||
|
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
|
||||||
|
},
|
||||||
|
"node_modules/serve-static": {
|
||||||
|
"version": "1.15.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz",
|
||||||
|
"integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==",
|
||||||
|
"dependencies": {
|
||||||
|
"encodeurl": "~1.0.2",
|
||||||
|
"escape-html": "~1.0.3",
|
||||||
|
"parseurl": "~1.3.3",
|
||||||
|
"send": "0.18.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/set-function-length": {
|
||||||
|
"version": "1.2.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
|
||||||
|
"integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==",
|
||||||
|
"dependencies": {
|
||||||
|
"define-data-property": "^1.1.4",
|
||||||
|
"es-errors": "^1.3.0",
|
||||||
|
"function-bind": "^1.1.2",
|
||||||
|
"get-intrinsic": "^1.2.4",
|
||||||
|
"gopd": "^1.0.1",
|
||||||
|
"has-property-descriptors": "^1.0.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/setprototypeof": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
|
||||||
|
},
|
||||||
|
"node_modules/side-channel": {
|
||||||
|
"version": "1.0.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz",
|
||||||
|
"integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==",
|
||||||
|
"dependencies": {
|
||||||
|
"call-bind": "^1.0.7",
|
||||||
|
"es-errors": "^1.3.0",
|
||||||
|
"get-intrinsic": "^1.2.4",
|
||||||
|
"object-inspect": "^1.13.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/statuses": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
|
||||||
|
"integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/toidentifier": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
|
||||||
|
"integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/type-is": {
|
||||||
|
"version": "1.6.18",
|
||||||
|
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
|
||||||
|
"integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
|
||||||
|
"dependencies": {
|
||||||
|
"media-typer": "0.3.0",
|
||||||
|
"mime-types": "~2.1.24"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/unpipe": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/utils-merge": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
|
||||||
|
"integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/vary": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
|
||||||
|
"integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"name": "example_dockerfile",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "",
|
||||||
|
"main": "index.js",
|
||||||
|
"scripts": {
|
||||||
|
"start": "node index.js",
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
},
|
||||||
|
"author": "",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"express": "^4.19.2"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
# Parts of Docker
|
||||||
|
## Docker File
|
||||||
|
a blueprint for building a docker image
|
||||||
|
|
||||||
|
## Docker Image
|
||||||
|
a template for running docker containers. These are IMMUTABLE!!!
|
||||||
|
|
||||||
|
## Docker Container
|
||||||
|
a running process (like a node app)
|
||||||
|
|
||||||
|
## Docker Volume
|
||||||
|
a "folder" on the host machine that can have data which multiple containers can access
|
||||||
|
|
||||||
|
|
||||||
|
## Docker Compose
|
||||||
|
runs multiple docker containers
|
||||||
|
|
||||||
|
*Note: docker can basically "freeze" the dev env so that any other devs will be able to exactly reproduce it*
|
||||||
|
|
||||||
|
|
||||||
|
# Commands
|
||||||
|
## docker ps
|
||||||
|
gives you a list of all images on your system
|
||||||
|
|
||||||
|
|
||||||
|
## docker volume create (name)
|
||||||
|
|
||||||
|
|
||||||
|
## docker build \[flags] (directory)
|
||||||
|
builds the docker image
|
||||||
|
|
||||||
|
### Options
|
||||||
|
* -t [NAMETAG] - gives the docker conainer a name (i.e. ION606/myimage:1.0)
|
||||||
|
|
||||||
|
|
||||||
|
## docker run (imageId || tagName)
|
||||||
|
|
||||||
|
### Options
|
||||||
|
* -p (LOCALPORT:CONTAINERPORT) - enables port forewarding between the docker container and the system
|
||||||
|
|
||||||
|
* --mount (source=volumeName) (target=mountingName)
|
||||||
|
|
||||||
|
|
||||||
|
## docker stop \[imageId]
|
||||||
|
*Note: to stop all just use `docker stop $(docker ps -a -q)`*
|
||||||
+93
@@ -0,0 +1,93 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>ION Knowledge Base</title>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
.folder {
|
||||||
|
margin: 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.folder>div {
|
||||||
|
cursor: pointer;
|
||||||
|
background-color: #f0f0f0;
|
||||||
|
padding: 10px;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.folder-content {
|
||||||
|
display: none;
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.folder-content a {
|
||||||
|
display: block;
|
||||||
|
margin: 5px 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
function toggleFolderContent(event) {
|
||||||
|
const contentDiv = event.currentTarget.nextElementSibling;
|
||||||
|
contentDiv.style.display = contentDiv.style.display === 'block' ? 'none' : 'block';
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<h1>Index</h1>
|
||||||
|
<div id="folders">
|
||||||
|
<!-- Folder entries will be inserted here -->
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
const folders = [
|
||||||
|
'AI and Blockchain',
|
||||||
|
'Computer Organization',
|
||||||
|
'Computer Science I',
|
||||||
|
'Data Structures',
|
||||||
|
'docker',
|
||||||
|
'Foundations from Computer Science',
|
||||||
|
'Introduction to Algorithms',
|
||||||
|
'kubernetes',
|
||||||
|
'Machine Learning from Data',
|
||||||
|
'Operating Systems',
|
||||||
|
'Programming Languages'
|
||||||
|
];
|
||||||
|
|
||||||
|
const foldersContainer = document.getElementById('folders');
|
||||||
|
|
||||||
|
folders.forEach(folder => {
|
||||||
|
const folderDiv = document.createElement('div');
|
||||||
|
folderDiv.className = 'folder';
|
||||||
|
folderDiv.innerHTML = `
|
||||||
|
<div onclick="toggleFolderContent(event)">${folder}</div>
|
||||||
|
<div class="folder-content">
|
||||||
|
<!-- Links to files in ${folder} will be inserted here -->
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
foldersContainer.appendChild(folderDiv);
|
||||||
|
|
||||||
|
fetch(`${folder}`)
|
||||||
|
.then(response => response.text())
|
||||||
|
.then(data => {
|
||||||
|
const parser = new DOMParser();
|
||||||
|
const doc = parser.parseFromString(data, 'text/html');
|
||||||
|
const links = doc.querySelectorAll('a');
|
||||||
|
const contentDiv = folderDiv.querySelector('.folder-content');
|
||||||
|
links.forEach(link => {
|
||||||
|
const linkElement = document.createElement('a');
|
||||||
|
linkElement.href = `${folder}/${link.getAttribute('href')}`;
|
||||||
|
linkElement.textContent = link.textContent;
|
||||||
|
contentDiv.appendChild(linkElement);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
## Worker Node
|
||||||
|
can be a physical server, virtual machine, etc
|
||||||
|
|
||||||
|
made up of........
|
||||||
|
## pods
|
||||||
|
- a wrapper over a container so that Kubernetes can replace them if necessary
|
||||||
|
- there is usually 1 application per pod (or 1 application with a helper)
|
||||||
|
|
||||||
|
|
||||||
|
**pods are EPHEMERAL** (they can die very easily)
|
||||||
|
★ for example, if the app contained in the pod's wrapped container crashes, runs out of resources, etc
|
||||||
|
|
||||||
|
when this happens, a new pod is created in it's place, with a new address.
|
||||||
|
To work with this, we attach a.....
|
||||||
|
|
||||||
|
## Service
|
||||||
|
- a static IP address that is attatched to each pod/app
|
||||||
|
- an app (stored in a node) will have it's own service/database, and every pod will have it's own service
|
||||||
|
- the service lifetime is not connected to the pod's, so when the pod is replaced, the same internal IP can be used
|
||||||
|
- also works as a load balancer when allocating requests to pods
|
||||||
|
|
||||||
|
|
||||||
|
There are **two types of services**
|
||||||
|
1. internal
|
||||||
|
- this is the default type
|
||||||
|
- can not be accessed externally
|
||||||
|
2. external
|
||||||
|
- you must specify this when creating a service
|
||||||
|
- can communicate externally (i.e. via browser for a web app's endpoint)
|
||||||
|
- can be accessed via http://[node_ip_addr][service_port_number]
|
||||||
|
|
||||||
|
what if you want to access something, but it needs to be via some sort of domain?
|
||||||
|
use.....
|
||||||
|
|
||||||
|
## Ingress
|
||||||
|
- exposes HTTP and HTTPS routes from outside the cluster to services within the cluster
|
||||||
|
- you set **rules**, which will then decide how requests are routed (forewarded to services or otherwise)
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
## ConfigMap
|
||||||
|
- external configurations for your application (i.e. database urls)
|
||||||
|
- connected to pods so that they have access to this data
|
||||||
|
- this allows you to just change the value in the configMap without re-building the pods
|
||||||
|
- stored in plaintext
|
||||||
|
|
||||||
|
**HOWEVER**
|
||||||
|
This type of storage is ***NOT*** secure, so kubernetes offers.....
|
||||||
|
|
||||||
|
## Secret
|
||||||
|
- just like configMap, but for secrets (i.e. usernames, passowrd, etc)
|
||||||
|
- stored in base64-encoded format
|
||||||
|
- is meant to be encrypted using third-party tools (perhaps given by the cloud provider)
|
||||||
|
|
||||||
|
|
||||||
|
**BOTH** ConfigMap and Secret can be used inside of pods like env vars or as a properties file
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
## Volume
|
||||||
|
- used for data storage
|
||||||
|
★ imagine there is a "database" pod. If that pod restarts, your data is gone
|
||||||
|
- attaches physical storage to a pod
|
||||||
|
- can be on the same machine the pod is running on or a remote source outside of the cluster
|
||||||
|
- **kubernetes does not manage data persistance**
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
# Communicating with the Master Node
|
||||||
|
### Format
|
||||||
|
a request must be in `YAML` format and has:
|
||||||
|
1. apiVersion
|
||||||
|
- the api version
|
||||||
|
|
||||||
|
2. kind
|
||||||
|
- the kind of thing this is referring to (Service, Deployement, etc)
|
||||||
|
|
||||||
|
3. metadata
|
||||||
|
- name of component
|
||||||
|
- matchLabels (labels)
|
||||||
|
* this is like a tag for that component to be matched by `selectors`
|
||||||
|
* this is ONLY used by selectors ONE LAYER UP (i.e. service --> deployement/pods)
|
||||||
|
|
||||||
|
4. spec (specification)
|
||||||
|
- any configurations you might need (selector, port, etc)
|
||||||
|
- this will be `kind` specific
|
||||||
|
- this section will be expanded on down below
|
||||||
|
|
||||||
|
5. status
|
||||||
|
- this is automatically generated by kubernetes
|
||||||
|
★ for example, if you put `replicas: 2` under `spec`, kubernetes will add a status that lets it know that only 1 state is currently running, then continuously update it as new replicas are added or removed, change the number of replicas accordingly
|
||||||
|
- kubernetes gets this data from the `etcd` and compares it to your request
|
||||||
|
★ YAML is horrid, so consider using a tool like [https://yamlchecker.com/](https://yamlchecker.com/)
|
||||||
|
|
||||||
|
|
||||||
|
## The Spec Field
|
||||||
|
This gets it's own section because it can contain so many things. For example:
|
||||||
|
|
||||||
|
### Pod Blueprints
|
||||||
|
* stored in the `template` field, these are the blueprints for the pods
|
||||||
|
* these will have their own `spec` and `metadata` fields in them
|
||||||
|
* like nested configuration files as pods need their own configuration "files" inside of the **deployement**'s configuration file
|
||||||
|
|
||||||
|
### Selectors
|
||||||
|
* tells the deployement what `label` to match
|
||||||
|
* this is ONLY used by selectors ONE LAYER DOWN (i.e. deployement/pods --> service)
|
||||||
|
|
||||||
|
### Ports
|
||||||
|
* the **service** has a port where it is accessible at
|
||||||
|
- this is the `port` variable
|
||||||
|
* the **service** also needs a protocol which it is accessible by
|
||||||
|
- this is the `protocol` variable
|
||||||
|
* the **service** also needs to know what port the pod to be contacted is listening on
|
||||||
|
- this is the `targetPort` variable
|
||||||
|
* the **pod** has a port it is listening on
|
||||||
|
- this is the `containerPort` variable
|
||||||
|
|
||||||
|
*Note: these files are ***declarative***, so for example if you specify there must be 3 replicas, kubernetes will try to ensure there are three replicas*
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
to avoid downtime, create a......
|
||||||
|
|
||||||
|
## Deployement
|
||||||
|
- a blueprint for for a process-specific pod
|
||||||
|
- you specify how many replicas of the pod to make
|
||||||
|
- this is an *abstraction* on top of pods
|
||||||
|
- can scale up or down
|
||||||
|
★ if one of the replicated pods dies, the service will simply foreward the request to whatever pod has the lightest load
|
||||||
|
|
||||||
|
what if multiple pods want to write to a storage medium? Then we have to use a......
|
||||||
|
|
||||||
|
## StatefulSet
|
||||||
|
- replaces deployements for *stateful* apps (apps that need static information)
|
||||||
|
★ examples of stateful apps include databases, email, etc
|
||||||
|
- ensures database reads/writes are synchronized
|
||||||
|
- very complicated, consider hosting outside of the kubernetes cluster
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
# https://kubernetes.io/docs/concepts/configuration/configmap/
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: mongo-config
|
||||||
|
data:
|
||||||
|
mongo-url: mongo-service
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# https://kubernetes.io/docs/concepts/configuration/secret/
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: mongo-secret
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
mongo-user: bW9uZ291c2Vy
|
||||||
|
mongo-password: bW9uZ29wYXNzd29yZA==
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
# deployement and service for mongodb
|
||||||
|
# https://kubernetes.io/docs/concepts/workloads/controllers/deployment/
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: mgongo-deployment
|
||||||
|
labels:
|
||||||
|
app: mgongo
|
||||||
|
spec: # deployement-specific
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: mgongo
|
||||||
|
template: # deployement for the pods
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: mgongo
|
||||||
|
spec:
|
||||||
|
containers: # https://hub.docker.com/_/mongo
|
||||||
|
- name: mongodb
|
||||||
|
image: mongo:5.0
|
||||||
|
ports:
|
||||||
|
- containerPort: 27017
|
||||||
|
env: # sameple values for the demo webserver
|
||||||
|
- name: MONGO_INITDB_ROOT_USERNAME
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef: # get from secrets
|
||||||
|
name: mongo-secret
|
||||||
|
key: mongo-user
|
||||||
|
- name: MONGO_INITDB_ROOT_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef: # get from secrets
|
||||||
|
name: mongo-secret
|
||||||
|
key: mongo-password
|
||||||
|
--- # "new file"
|
||||||
|
# https://kubernetes.io/docs/concepts/services-networking/service/
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: mongo-service
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: mongo
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 27017
|
||||||
|
targetPort: 27017
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
## Initial Steps (readying your app)
|
||||||
|
*Note: I assume you already have a minikube running*
|
||||||
|
1. check if you have any pods running with `kubectl get pod` and stop them if so
|
||||||
|
|
||||||
|
2. create external configurations
|
||||||
|
- kubectl apply -f mongo-config.yaml
|
||||||
|
- kubectl apply -f mongo-secret.yaml
|
||||||
|
★ the -f is for file
|
||||||
|
|
||||||
|
3. create connection for the database
|
||||||
|
- kubectl apply -f mongo.yaml
|
||||||
|
|
||||||
|
4. deploy the web app
|
||||||
|
- kubectl apply -f webapp.yaml
|
||||||
|
|
||||||
|
|
||||||
|
## Kubectl
|
||||||
|
1. check your pods using `kubectl get all`
|
||||||
|
2. check your configmap using `kubectl get configmap`
|
||||||
|
3. check your secrets using `kubectl get secret`
|
||||||
|
|
||||||
|
- you can use `kubectl get [component_name]` to get some data for any component or run `kubectl get --help` for help with the `get` subcommand
|
||||||
|
|
||||||
|
- you can use `kubectl describe service [service_name]` to get a description of the service
|
||||||
|
|
||||||
|
- you can use `kubectl logs [pod_name]` to get the logs for that pod
|
||||||
|
|
||||||
|
## Accessing the Application Externally
|
||||||
|
In our case from the browser
|
||||||
|
1. use `kubectl get svc` to get the service
|
||||||
|
2. get the `nodPort`'s ip using `minikube ip`
|
||||||
|
★ you can access more data using `kubectl get node -o wide`
|
||||||
|
3. access the ip using the corresponding IP address : port
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
# deployement and service for mongodb
|
||||||
|
# https://kubernetes.io/docs/concepts/workloads/controllers/deployment/
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: webapp-deployment
|
||||||
|
labels:
|
||||||
|
app: webapp
|
||||||
|
spec: # deployement-specific
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: webapp
|
||||||
|
template: # deployement for the pods
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: webapp
|
||||||
|
spec:
|
||||||
|
containers: # https://hub.docker.com/_/mongo
|
||||||
|
- name: webapp
|
||||||
|
image: nanajanashia/k8s-demo-app:v1.0 # demo web app
|
||||||
|
ports:
|
||||||
|
- containerPort: 3000
|
||||||
|
env: #add demo information
|
||||||
|
- name: USER_NAME
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef: # get from secrets
|
||||||
|
name: mongo-secret
|
||||||
|
key: mongo-user
|
||||||
|
- name: USER_PWD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef: # get from secrets
|
||||||
|
name: mongo-secret
|
||||||
|
key: mongo-password
|
||||||
|
- name: DB_URL
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef: # get from configMap
|
||||||
|
name: mongo-config
|
||||||
|
key: mongo-url
|
||||||
|
--- # "new file"
|
||||||
|
# https://kubernetes.io/docs/concepts/services-networking/service/
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: webapp-service
|
||||||
|
spec:
|
||||||
|
type: NodePort # external service port type
|
||||||
|
selector:
|
||||||
|
app: webapp
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 3000
|
||||||
|
targetPort: 3000
|
||||||
|
nodePort: 30100 # see https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport for ranges
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
you can run using [minicube](https://minikube.sigs.k8s.io/docs/start/?)!
|
||||||
|
small open-source program where both the master and node both run on one machine
|
||||||
|
|
||||||
|
you can interact with the cluster using [cubectl](https://kubernetes.io/docs/tasks/tools/)!
|
||||||
|
|
||||||
|
|
||||||
|
minikube can either start as a container or a virtual machine (make sure you have docker installed)
|
||||||
|
|
||||||
|
## Setting it up
|
||||||
|
you can start minikube by running `minikube start --driver=docker`
|
||||||
|
|
||||||
|
## Checking
|
||||||
|
just use `minikube status`
|
||||||
|
|
||||||
|
## Interacting with Minikube
|
||||||
|
1. get the node using `kubectl get node`
|
||||||
|
|
||||||
|
*Note: when creating secrets, you can just use `echo -n datahere | base64` to encode it*
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
My notes from https://www.youtube.com/watch?v=s_o8dwzRlu4 and other videos
|
||||||
|
|
||||||
|
# What is kubernetes
|
||||||
|
* an open source container orchestration tool
|
||||||
|
* helps you manage apps that are made of 100s or 1000s of containers in different dev environments (cloud, local, etc)
|
||||||
|
|
||||||
|
|
||||||
|
## Container Orchestration Tool
|
||||||
|
* manages many containers
|
||||||
|
* offers high availability (little to no downtime)
|
||||||
|
* offers scalability
|
||||||
|
* offers disaster recovery (backup and restore)
|
||||||
|
|
||||||
|
|
||||||
|
## Kubernetes Cluster Structure
|
||||||
|
### at least 1 Master Node
|
||||||
|
has:
|
||||||
|
* API Server (the entrypoint for the kubernetes cluster), this is what the kubernetes clients (UI, API, CLI, etc) will talk to
|
||||||
|
* Controller Manager
|
||||||
|
- keeps track of the cluster (i.e. a container has died, restart it)
|
||||||
|
* Scheduler
|
||||||
|
- decides on which node any new container should be scheduled
|
||||||
|
- it does this based on workload, server resources on each node, etc
|
||||||
|
* etcd
|
||||||
|
- key/value storage for the current state of the cluster
|
||||||
|
- holds the current config data, status data of each node/the node's container, etc
|
||||||
|
- snapshots of this etcd are used for RECOVERY
|
||||||
|
|
||||||
|
**connected to it, there are many smaller**
|
||||||
|
|
||||||
|
### Worker Nodes
|
||||||
|
all of which have:
|
||||||
|
* a kublet (kubernetes process that talks to other kublets and master node) running on it
|
||||||
|
* docker containers (which do the work)
|
||||||
|
|
||||||
|
|
||||||
|
### Virtual Network
|
||||||
|
* spans all the nodes in the cluster
|
||||||
|
* enables the nodes to talk to each other
|
||||||
|
|
||||||
|
*Note: in most prod environments, it's recommended to have more than one master node so that if one of them fails, the process can continue running*
|
||||||
Reference in New Issue
Block a user