given files
This commit is contained in:
parent
9bf88844e9
commit
a2c31f873d
48 changed files with 10458 additions and 0 deletions
37
server/.env
Normal file
37
server/.env
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
# Environment variables declared in this file are automatically made available to Prisma.
|
||||
# See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema
|
||||
|
||||
# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB.
|
||||
# See the documentation for all the connection string options: https://pris.ly/d/connection-strings
|
||||
NODE_ENV="production"
|
||||
RECORDER="active"
|
||||
|
||||
SERVER_PORT=3333
|
||||
WSS_PORT=3334
|
||||
|
||||
POSTGRES_USER="postgres"
|
||||
POSTGRES_PASSWORD="postgres"
|
||||
POSTGRES_HOST="postgres"
|
||||
POSTGRES_PORT=5432
|
||||
POSTGRES_DB="eplace"
|
||||
POSTGRES_SCHEMA="public"
|
||||
DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}?schema=${POSTGRES_SCHEMA}"
|
||||
|
||||
REDIS_HOST="redis"
|
||||
REDIS_PORT=6379
|
||||
|
||||
PUBLIC_API_URL="http://localhost:3333/api"
|
||||
|
||||
JWKS_URI="https://cri.epita.fr/jwks"
|
||||
# DO NOT ERASE THIS UID, IT IS USE AS DEFAULT USER TO SETUP ROOMs, PIXELS
|
||||
# CHECK README FOR MORE DETAILS
|
||||
# You can add more admin uids by separating them with a comma
|
||||
# Example: 9361,9362,9363
|
||||
ADMIN_UID_LIST="9361"
|
||||
|
||||
RATE_LIMITS_CONFIG_PATH="./config/rate-limits.config.json"
|
||||
ROOMS_CONFIG_PATH="./config/rooms.config.json"
|
||||
|
||||
DISABLE_ADMIN_PREVILEGES="true"
|
||||
DISABLE_AUTH="false"
|
||||
DISABLE_RATE_LIMITING="true"
|
||||
1
server/config/default-canvas-250.txt
Normal file
1
server/config/default-canvas-250.txt
Normal file
File diff suppressed because one or more lines are too long
BIN
server/config/default-canvas-50.txt
Normal file
BIN
server/config/default-canvas-50.txt
Normal file
Binary file not shown.
54
server/config/rate-limits.config.json
Normal file
54
server/config/rate-limits.config.json
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
{
|
||||
"testsLimiter": {
|
||||
"limit": 10,
|
||||
"interval": 1
|
||||
},
|
||||
"getCanvasLimiter": {
|
||||
"limit": 10,
|
||||
"interval": 1
|
||||
},
|
||||
"getPixelLimiter": {
|
||||
"limit": 10,
|
||||
"interval": 1
|
||||
},
|
||||
"placePixelLimiter": {
|
||||
"limit": 1,
|
||||
"interval": 30
|
||||
},
|
||||
"getRoomsLimiter": {
|
||||
"limit": 10,
|
||||
"interval": 1
|
||||
},
|
||||
"getRoomConfigLimiter": {
|
||||
"limit": 10,
|
||||
"interval": 1
|
||||
},
|
||||
"createRoomLimiter": {
|
||||
"limit": 1,
|
||||
"interval": 300
|
||||
},
|
||||
"updateRoomLimiter": {
|
||||
"limit": 1,
|
||||
"interval": 1
|
||||
},
|
||||
"deleteRoomLimiter": {
|
||||
"limit": 2,
|
||||
"interval": 1
|
||||
},
|
||||
"getStudentLimiter": {
|
||||
"limit": 10,
|
||||
"interval": 1
|
||||
},
|
||||
"updateStudentLimiter": {
|
||||
"limit": 1,
|
||||
"interval": 1
|
||||
},
|
||||
"sendMessageLimiter": {
|
||||
"limit": 1,
|
||||
"interval": 1
|
||||
},
|
||||
"reportRoomLimiter": {
|
||||
"limit": 1,
|
||||
"interval": 5
|
||||
}
|
||||
}
|
||||
46
server/config/rooms.config.json
Normal file
46
server/config/rooms.config.json
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
"maxRoomsCreatedPerUser": 3,
|
||||
"rooms": {
|
||||
"default": {
|
||||
"metadata": {
|
||||
"name": "default room",
|
||||
"slug": "default",
|
||||
"description": "default room",
|
||||
"canvasDimensions": 50,
|
||||
"iconURL": "https://media.tenor.com/XUHq8pN_maQAAAAi/puffer-fish-fish.gif",
|
||||
"isPublic": false
|
||||
},
|
||||
"settings": {
|
||||
"roomColors": "#ffffff,#d4d7d9,#898d90,#515252,#000000,#fe4500,#fea800,#fed634,#01a268,#7eed56,#2350a4,#3690ea,#51e9f4,#811f9f,#b44bc0,#ff99aa,#9c6925",
|
||||
"defaultCanvas": "config/default-canvas-50.txt"
|
||||
}
|
||||
},
|
||||
"epi-place": {
|
||||
"metadata": {
|
||||
"name": "epi/place",
|
||||
"slug": "epi-place",
|
||||
"description": "Le Roi de la malice est passé par là",
|
||||
"canvasDimensions": 250,
|
||||
"iconURL": "https://media.tenor.com/XUHq8pN_maQAAAAi/puffer-fish-fish.gif",
|
||||
"isPublic": true
|
||||
},
|
||||
"settings": {
|
||||
"roomColors": "#ffffff,#d4d7d9,#898d90,#515252,#000000,#6c001a,#be0039,#fe4500,#fea800,#fed634,#fff8b8,#01a268,#00cc78,#7eed56,#02756f,#019eaa,#00ccbf,#2350a4,#3690ea,#51e9f4,#493ac1,#6a5cff,#94b3ff,#811f9f,#b44bc0,#e4aaff,#de107f,#ff3981,#ff99aa,#6d482f,#9c6925,#ffb470,#811f9f,#000000",
|
||||
"defaultCanvas": "config/default-canvas-250.txt"
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"metadata": {
|
||||
"name": "Test Room",
|
||||
"description": "A room small enough to test things out",
|
||||
"canvasDimensions": 10,
|
||||
"iconURL": "https://media.tenor.com/XUHq8pN_maQAAAAi/puffer-fish-fish.gif",
|
||||
"slug": "test",
|
||||
"isPublic": true
|
||||
},
|
||||
"settings": {
|
||||
"roomColors": "#ffffff,#d4d7d9,#898d90,#515252,#000000,#fe4500,#fea800,#fed634,#01a268,#7eed56,#2350a4,#3690ea,#51e9f4,#811f9f,#b44bc0,#ff99aa,#9c6925"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
56
server/docker-compose.yml
Normal file
56
server/docker-compose.yml
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
version: '3.9'
|
||||
services:
|
||||
postgres:
|
||||
image: registry.cri.epita.fr/ing/assistants/public/registry/postgres:15.2-alpine
|
||||
container_name: postgres
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: eplace
|
||||
expose:
|
||||
- 5432
|
||||
volumes:
|
||||
- postgres-data:/var/lib/postgresql/data
|
||||
# Proper docker-compose would use named networks
|
||||
# networks:
|
||||
# - postgres-network
|
||||
redis:
|
||||
image: registry.cri.epita.fr/ing/assistants/public/registry/redis:7.0.9-alpine
|
||||
container_name: redis
|
||||
restart: always
|
||||
expose:
|
||||
- 6379
|
||||
volumes:
|
||||
- redis-data:/data
|
||||
# Proper docker-compose would use named networks
|
||||
# networks:
|
||||
# - redis-network
|
||||
eplace:
|
||||
image: registry.cri.epita.fr/ing/assistants/public/registry/eplace:latest
|
||||
container_name: eplace
|
||||
restart: always
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
volumes:
|
||||
- ./config:/usr/src/app/config
|
||||
- type: 'bind'
|
||||
source: './.env'
|
||||
target: '/usr/src/app/.env'
|
||||
ports:
|
||||
- 3000:3000
|
||||
- 3333:3333
|
||||
# Proper docker-compose would use named networks
|
||||
# networks:
|
||||
# - postgres-network
|
||||
# - redis-network
|
||||
depends_on:
|
||||
- postgres
|
||||
- redis
|
||||
volumes:
|
||||
postgres-data:
|
||||
redis-data:
|
||||
# Proper docker-compose would use named networks
|
||||
# networks:
|
||||
# postgres-network:
|
||||
# redis-network:
|
||||
5503
server/openapi/openapi.json
Normal file
5503
server/openapi/openapi.json
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue