mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2024-12-12 15:36:22 +00:00
fix: docker configuration
use debian bullseye image instead of alpine linux uWS.js does not work on alpine linux, unfortunately
This commit is contained in:
parent
6402f99fbd
commit
6b0bb0a01f
@ -8,7 +8,7 @@
|
||||
|
||||
## Features
|
||||
|
||||
* Powered by [uWebSockets.js](https://github.com/uNetworking/uWebSockets.js/) & [HyperExpress](https://github.com/kartikk221/hyper-express) for a much more performant web server, due to being a Node.js binding of [uWebSockets](https://github.com/uNetworking/uWebSockets) written in C & C++.
|
||||
* Powered by [uWebSockets.js](https://github.com/uNetworking/uWebSockets.js) & [HyperExpress](https://github.com/kartikk221/hyper-express) for a much more performant web server, due to being a Node.js binding of [uWebSockets](https://github.com/uNetworking/uWebSockets) written in C & C++.
|
||||
* Powered by [better-sqlite3](https://github.com/WiseLibs/better-sqlite3) for performant SQLite3 database (using [Knex.js](https://knexjs.org/) for abstraction, thus support for other database engines *may* also come in the future).
|
||||
* Faster file hashing for duplicates detection by using [BLAKE3](https://github.com/BLAKE3-team/BLAKE3) hash function.
|
||||
* ClamAV virus scanning support for Linux/OS X servers ([read more](#clamav-support)).
|
||||
|
@ -2,11 +2,22 @@
|
||||
|
||||
If you want to avoid all the hassle of installing the dependencies, configuring nginx and so on you can try our docker image which makes things a bit simpler.
|
||||
|
||||
## Requirements
|
||||
|
||||
First make sure you have docker and docker composer installed, so please follow the install instructions for your OS/Distro:
|
||||
- https://docs.docker.com/engine/install/debian/
|
||||
- https://docs.docker.com/compose/install/
|
||||
|
||||
After that:
|
||||
### Notice
|
||||
|
||||
This Docker configuration will use `node:18-bullseye` image by default (Debian Bullseye), which may result in relatively bigger image size, as compared to the likes of Alpine Linux.
|
||||
|
||||
Unfortunately, [uWebSockets.js](https://github.com/uNetworking/uWebSockets.js/) requires platforms that Node considers "Tier 1", which does not include Alpine Linux and the likes (platforms that use `musl` instead of `glibc`).
|
||||
|
||||
https://github.com/nodejs/node/blob/main/BUILDING.md#platform-list
|
||||
|
||||
### Steps
|
||||
|
||||
- Navigate to this directory (`docker`).
|
||||
- Copy the config file called `docker-compose.config.example.yml` and name it `docker-compose.config.yml` with the values you want. Those that are left commented will use the default values.
|
||||
- Navigate to `nginx` directory, then copy either `lolisafe.tld.http.example.conf` or `lolisafe.tld.https.example.conf` and name it `lolisafe.tld.conf` for either HTTP or HTTPS.
|
||||
@ -20,6 +31,6 @@ Once you are done run the following commands:
|
||||
- `./lolisafe.sh prod build`
|
||||
- `./lolisafe.sh prod up -d`
|
||||
|
||||
If you are on a Windows host, replace `./lolisafe.sh` with `./lolisafe.ps1`.
|
||||
If you are on a Windows host, replace `./lolisafe.sh` with `.\lolisafe.ps1`.
|
||||
|
||||
Congrats, your lolisafe instance is now running.
|
||||
|
@ -1,19 +1,13 @@
|
||||
FROM jrottenberg/ffmpeg:5-alpine as ffmpeg
|
||||
|
||||
FROM node:16-alpine
|
||||
FROM node:18-bullseye
|
||||
|
||||
WORKDIR /usr/lolisafe
|
||||
COPY package.json yarn.lock ./
|
||||
|
||||
RUN apk add --update \
|
||||
&& apk add --no-cache ca-certificates expat \
|
||||
&& apk add --no-cache vidstab-dev --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community \
|
||||
&& apk add --no-cache --virtual .build-deps git curl build-base python3 g++ make \
|
||||
&& yarn install --production \
|
||||
&& yarn cache clean \
|
||||
&& apk del .build-deps
|
||||
|
||||
COPY --from=ffmpeg /usr/local /usr/local
|
||||
RUN apt update &&\
|
||||
apt install -y python python3 make g++ git ffmpeg && \
|
||||
yarn install --production && \
|
||||
yarn cache clean && \
|
||||
apt clean
|
||||
|
||||
ADD config.sample.js config.js
|
||||
ADD views/_globals.sample.njk views/_globals.njk
|
||||
|
@ -50,7 +50,10 @@ http {
|
||||
client_max_body_size 100M;
|
||||
client_body_timeout 600s;
|
||||
|
||||
# Load configs
|
||||
# Load site configs
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
# include /etc/nginx/sites-enabled/*;
|
||||
|
||||
# Use this instead of "*.conf" to disable "default.conf" that comes shipped with Nginx
|
||||
# include /etc/nginx/conf.d/lolisafe.tld.conf;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user