This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80 default_server; | |
server_name example.com www.example.com; | |
access_log /srv/www/example.com/logs/access.log; | |
error_log /srv/www/example.com/logs/error.log; | |
root /srv/www/example.com/public; | |
index index.php index.html; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Request, Response } from 'express'; | |
import { Body, Controller, Post, Req, Res } from '@nestjs/common'; | |
import { UserService } from './user.service'; | |
import * as Redis from 'ioredis'; | |
import { RateLimiterRedis } from 'rate-limiter-flexible'; | |
const redisClient = new Redis({enableOfflineQueue: false}); | |
const maxWrongAttemptsByIPperDay = 100; | |
const maxConsecutiveFailsByUsernameAndIP = 5; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create user deployer with root account | |
adduser deployer | |
# Append (-a) a secondary group (-G) "www-data" to user "deployer" | |
usermod -a -G www-data deployer | |
# See groups assigned to user "deployer" | |
groups deployer | |
# Add ACL permission in /var/www |
Requirement
- USB flash drive - this is where the container filesystem will be persisted
Set-up docker bridge network
/interface bridge add name=docker
Set-up veth
to be used by container
Do not copy and paste this code, it requires changes
Other PHP versions available here: https://gist.github.com/search?q=user%3Amrl22+moss
As of writing this, Moss.sh does not support PHP 8.2 via the control panel even though Ubuntu does.
Set up your website using Moss.sh and select Apache with PHP 7.4.
Once complete, we need to install PHP 8.2 with all the packages moss installs for 7.4.