diff --git a/.env.example b/.env.example index ea3bec0..1f9aad4 100644 --- a/.env.example +++ b/.env.example @@ -1,2 +1,4 @@ EMAIL=email@example.org DOMAIN=MY-DOMAIN.com +PORT=9999 +UPLOAD_DIR=/opt/safe diff --git a/Dockerfile b/Dockerfile index c7d015a..f5c3771 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,7 @@ COPY package.json yarn.lock ./ RUN apk --no-cache update \ && apk add --no-cache --virtual build-dependencies python make g++ \ -&& apk add --no-cache ffmpeg \ +&& apk add --no-cache ffmpeg git \ && apk del build-dependencies \ && yarn install --production \ && yarn cache clean diff --git a/docker-compose.yaml b/docker-compose.yaml index 0434742..7ba0fa1 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,63 +1,19 @@ version: '3.8' -networks: - net: - driver: bridge - services: safe: - image: lolisafe/lolisafe + # image: lolisafe/lolisafe + build: . volumes: - ./config.js:/usr/src/lolisafe/config.js:ro - - ./uploads:/usr/src/lolisafe/uploads - restart: unless-stopped - networks: - - net - - nginx: - image: nginx - volumes: - - ./nginx.docker.conf:/etc/nginx/conf.d/default.conf:ro - - ./uploads:/uploads - expose: - - 80 - restart: unless-stopped - depends_on: - - safe - networks: - - net - labels: - - 'traefik.enable=true' - - 'traefik.http.routers.safe.rule=Host(`${DOMAIN}`)' - - 'traefik.http.routers.safe.entrypoints=https' - - 'traefik.http.routers.safe.tls=true' - - 'traefik.http.routers.safe.tls.certresolver=letsencrypt' - - traefik: - image: traefik:latest - container_name: traefik - volumes: - - ./traefik/acme.json:/acme.json - - /var/run/docker.sock:/var/run/docker.sock - networks: - - net + - ./database:/usr/src/lolisafe/database + - "${UPLOAD_DIR:-./uploads}:/usr/src/lolisafe/uploads" ports: - - 80:80 - - 443:443 - command: - - '--log.level=INFO' - - '--providers.docker=true' - - '--providers.docker.exposedByDefault=false' - - '--entrypoints.http=true' - - '--entrypoints.http.address=:80' - - '--certificatesresolvers.letsencrypt.acme.email=${EMAIL}' - - '--certificatesresolvers.letsencrypt.acme.storage=acme.json' - - '--certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=http' - - '--entrypoints.http.http.redirections.entrypoint.to=https' - - '--entrypoints.http.http.redirections.entrypoint.scheme=https' - - '--entrypoints.https=true' - - '--entrypoints.https.address=:443' - restart: unless-stopped + - "${PORT:-9999}:9999" depends_on: - - nginx + - clamav + restart: unless-stopped + clamav: + image: tiredofit/clamav + restart: unless-stopped diff --git a/pages/error/404.html b/pages/error/404.html index 40fe826..f0cfd7b 100644 --- a/pages/error/404.html +++ b/pages/error/404.html @@ -1,13 +1,75 @@ - - - 404 - Resource not found - + + + + 404 | Rita + + -

Resource not found 404

The requested resource could not be found.

- +
+
+

Page not found

+ + + Art by Fukuro袋子 + +
+ +
diff --git a/pages/error/500.html b/pages/error/500.html index 12bca48..1b9d82b 100644 --- a/pages/error/500.html +++ b/pages/error/500.html @@ -1,14 +1,78 @@ - - - 500 - Webservice currently unavailable - + + + + 500 | Rita + + -

Webservice currently unavailable 500

An unexpected condition was encountered. -Our service team has been dispatched to bring it back online.

- +
+
+

Internal Server Error

+ Something broke on this server.
+ Please try again later!
+
+ + + Art by Fukuro袋子 + +
+ +
diff --git a/public/icons/120px.png b/public/icons/120px.png deleted file mode 100644 index 44ad252..0000000 Binary files a/public/icons/120px.png and /dev/null differ diff --git a/public/icons/152px.png b/public/icons/152px.png deleted file mode 100644 index 5a47d39..0000000 Binary files a/public/icons/152px.png and /dev/null differ diff --git a/public/icons/167px.png b/public/icons/167px.png deleted file mode 100644 index 937e7dc..0000000 Binary files a/public/icons/167px.png and /dev/null differ diff --git a/public/icons/180px.png b/public/icons/180px.png deleted file mode 100644 index a20e71b..0000000 Binary files a/public/icons/180px.png and /dev/null differ diff --git a/public/icons/192pxr.png b/public/icons/192pxr.png deleted file mode 100644 index 05f23f3..0000000 Binary files a/public/icons/192pxr.png and /dev/null differ diff --git a/public/icons/270px.png b/public/icons/270px.png deleted file mode 100644 index c53f4ae..0000000 Binary files a/public/icons/270px.png and /dev/null differ diff --git a/public/icons/310px.png b/public/icons/310px.png deleted file mode 100644 index 6648d95..0000000 Binary files a/public/icons/310px.png and /dev/null differ diff --git a/public/icons/310pxw.png b/public/icons/310pxw.png deleted file mode 100644 index 63ed7bc..0000000 Binary files a/public/icons/310pxw.png and /dev/null differ diff --git a/public/icons/32pxr.png b/public/icons/32pxr.png deleted file mode 100644 index 3c60863..0000000 Binary files a/public/icons/32pxr.png and /dev/null differ diff --git a/public/icons/384pxr.png b/public/icons/384pxr.png deleted file mode 100644 index 8ce4591..0000000 Binary files a/public/icons/384pxr.png and /dev/null differ diff --git a/public/icons/512pxr.png b/public/icons/512pxr.png deleted file mode 100644 index 9a1ce0a..0000000 Binary files a/public/icons/512pxr.png and /dev/null differ diff --git a/public/icons/600px.png b/public/icons/600px.png deleted file mode 100644 index 2d723a6..0000000 Binary files a/public/icons/600px.png and /dev/null differ diff --git a/public/icons/600pxr.png b/public/icons/600pxr.png deleted file mode 100644 index e61d13d..0000000 Binary files a/public/icons/600pxr.png and /dev/null differ diff --git a/public/icons/70px.png b/public/icons/70px.png deleted file mode 100644 index b8cdf35..0000000 Binary files a/public/icons/70px.png and /dev/null differ diff --git a/public/icons/96pxr.png b/public/icons/96pxr.png deleted file mode 100644 index d99f7f5..0000000 Binary files a/public/icons/96pxr.png and /dev/null differ diff --git a/public/icons/android-chrome-144x144.png b/public/icons/android-chrome-144x144.png new file mode 100644 index 0000000..77d940f Binary files /dev/null and b/public/icons/android-chrome-144x144.png differ diff --git a/public/icons/android-chrome-192x192.png b/public/icons/android-chrome-192x192.png new file mode 100644 index 0000000..f36503b Binary files /dev/null and b/public/icons/android-chrome-192x192.png differ diff --git a/public/icons/android-chrome-256x256.png b/public/icons/android-chrome-256x256.png new file mode 100644 index 0000000..c5039e6 Binary files /dev/null and b/public/icons/android-chrome-256x256.png differ diff --git a/public/icons/android-chrome-36x36.png b/public/icons/android-chrome-36x36.png new file mode 100644 index 0000000..30bd937 Binary files /dev/null and b/public/icons/android-chrome-36x36.png differ diff --git a/public/icons/android-chrome-384x384.png b/public/icons/android-chrome-384x384.png new file mode 100644 index 0000000..87582af Binary files /dev/null and b/public/icons/android-chrome-384x384.png differ diff --git a/public/icons/android-chrome-48x48.png b/public/icons/android-chrome-48x48.png new file mode 100644 index 0000000..7048e49 Binary files /dev/null and b/public/icons/android-chrome-48x48.png differ diff --git a/public/icons/android-chrome-512x512.png b/public/icons/android-chrome-512x512.png new file mode 100644 index 0000000..bff98cb Binary files /dev/null and b/public/icons/android-chrome-512x512.png differ diff --git a/public/icons/android-chrome-72x72.png b/public/icons/android-chrome-72x72.png new file mode 100644 index 0000000..f5b4115 Binary files /dev/null and b/public/icons/android-chrome-72x72.png differ diff --git a/public/icons/android-chrome-96x96.png b/public/icons/android-chrome-96x96.png new file mode 100644 index 0000000..8b7dc48 Binary files /dev/null and b/public/icons/android-chrome-96x96.png differ diff --git a/public/icons/apple-touch-icon.png b/public/icons/apple-touch-icon.png new file mode 100644 index 0000000..3a65d0d Binary files /dev/null and b/public/icons/apple-touch-icon.png differ diff --git a/public/icons/browserconfig.xml b/public/icons/browserconfig.xml index b215615..797c1f9 100644 --- a/public/icons/browserconfig.xml +++ b/public/icons/browserconfig.xml @@ -1,12 +1,9 @@ - - - - - - - #232629 - - + + + + #b63a74 + + diff --git a/public/icons/favicon-16x16.png b/public/icons/favicon-16x16.png new file mode 100644 index 0000000..f24f3a8 Binary files /dev/null and b/public/icons/favicon-16x16.png differ diff --git a/public/icons/favicon-32x32.png b/public/icons/favicon-32x32.png new file mode 100644 index 0000000..c80e97a Binary files /dev/null and b/public/icons/favicon-32x32.png differ diff --git a/public/icons/favicon.ico b/public/icons/favicon.ico new file mode 100644 index 0000000..86cb2e3 Binary files /dev/null and b/public/icons/favicon.ico differ diff --git a/public/icons/manifest.json b/public/icons/manifest.json index 7ee8393..bde9562 100644 --- a/public/icons/manifest.json +++ b/public/icons/manifest.json @@ -1,28 +1,53 @@ { - "name": "safe.fiery.me", - "short_name": "fiery.me", - "description": "A pomf-like file uploading service that doesn't suck.", - "background_color": "#232629", - "theme_color": "#232629", - "display": "standalone", - "lang": "en-US", - "orientation": "any", - "start_url": "/", - "icons": [ - { - "src": "/icons/192pxr.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "/icons/384pxr.png", - "sizes": "384x384", - "type": "image/png" - }, - { - "src": "/icons/512pxr.png", - "sizes": "512x512", - "type": "image/png" - } - ] + "name": "Safe.Rita.moe", + "short_name": "SafeRita", + "icons": [ + { + "src": "/icons/android-chrome-36x36.png", + "sizes": "36x36", + "type": "image/png" + }, + { + "src": "/icons/android-chrome-48x48.png", + "sizes": "48x48", + "type": "image/png" + }, + { + "src": "/icons/android-chrome-72x72.png", + "sizes": "72x72", + "type": "image/png" + }, + { + "src": "/icons/android-chrome-96x96.png", + "sizes": "96x96", + "type": "image/png" + }, + { + "src": "/icons/android-chrome-144x144.png", + "sizes": "144x144", + "type": "image/png" + }, + { + "src": "/icons/android-chrome-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "/icons/android-chrome-256x256.png", + "sizes": "256x256", + "type": "image/png" + }, + { + "src": "/icons/android-chrome-384x384.png", + "sizes": "384x384", + "type": "image/png" + }, + { + "src": "/icons/android-chrome-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ], + "theme_color": "#b63a74", + "background_color": "#b63a74" } diff --git a/public/icons/mstile-150x150.png b/public/icons/mstile-150x150.png new file mode 100644 index 0000000..e8c0119 Binary files /dev/null and b/public/icons/mstile-150x150.png differ diff --git a/public/icons/safari-pinned-tab.svg b/public/icons/safari-pinned-tab.svg new file mode 100644 index 0000000..7338c11 --- /dev/null +++ b/public/icons/safari-pinned-tab.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/images/fb_share.png b/public/images/fb_share.png index bb14fb4..a0cbb0d 100644 Binary files a/public/images/fb_share.png and b/public/images/fb_share.png differ diff --git a/public/images/logo.png b/public/images/logo.png index af6b940..360a18b 100644 Binary files a/public/images/logo.png and b/public/images/logo.png differ diff --git a/public/images/logo_big.png b/public/images/logo_big.png index 2b08f47..e1d254f 100644 Binary files a/public/images/logo_big.png and b/public/images/logo_big.png differ diff --git a/public/images/logo_smol.png b/public/images/logo_smol.png index aa5296f..25349d4 100644 Binary files a/public/images/logo_smol.png and b/public/images/logo_smol.png differ diff --git a/public/images/logo_smol@2x.png b/public/images/logo_smol@2x.png index 66cfaea..d2c0cd7 100644 Binary files a/public/images/logo_smol@2x.png and b/public/images/logo_smol@2x.png differ diff --git a/public/images/logo_square.png b/public/images/logo_square.png index 6cf16ce..6152264 100644 Binary files a/public/images/logo_square.png and b/public/images/logo_square.png differ diff --git a/public/safe.fiery.me.sxcu b/public/safe.rita.moe.sxcu similarity index 79% rename from public/safe.fiery.me.sxcu rename to public/safe.rita.moe.sxcu index 16bb39f..d651cc3 100644 --- a/public/safe.fiery.me.sxcu +++ b/public/safe.rita.moe.sxcu @@ -1,8 +1,8 @@ { - "Name": "safe.fiery.me", + "Name": "safe.rita.moe", "DestinationType": "ImageUploader, FileUploader", "RequestMethod": "POST", - "RequestURL": "https://safe.fiery.me/api/upload", + "RequestURL": "https://safe.rita.moe/api/upload", "Headers": { "token": "", "albumid": "", @@ -13,4 +13,4 @@ "FileFormName": "files[]", "URL": "$json:files[0].url$", "ThumbnailURL": "$json:files[0].url$" -} \ No newline at end of file +} diff --git a/views/_globals.njk b/views/_globals.njk index acbd4a4..7003a44 100644 --- a/views/_globals.njk +++ b/views/_globals.njk @@ -1,24 +1,24 @@ -{% set name = "safe.fiery.me" %} +{% set name = "safe.rita.moe" %} {% set motto = "A small safe worth protecting." %} {% set description = "A pomf-like file uploading service that doesn't suck." %} -{% set keywords = "upload,lolisafe,file,images,hosting,bobby,fiery" %} +{% set keywords = "upload,lolisafe,file,images,hosting,rita" %} {# Used in home.njk and nojs.njk #} {% set home_subtitle = "A modern self-hosted file upload service" %} {# HTML supported #} {# Used in faq.njk and cookiepolicy.njk #} -{% set root_domain = "fiery.me" %} +{% set root_domain = "rita.moe" %} {% set whole_faq = root_domain + " website and sub-domains" %} {% set whole_cookie = "This site and " + root_domain + " website and sub-domains" %} -{% set email = "bobby@fiery.me" %} +{% set email = "kody@rita.moe" %} -{% set fork_repo = "https://github.com/BobbyWibowo/lolisafe" %} -{% set fork_host = "GitHub" %} -{% set fork_issues = fork_repo + "/issues/new/choose" %} +{% set fork_repo = "https://git.rita.moe/rita/lolisafe" %} +{% set fork_host = "Gitea" %} +{% set fork_issues = fork_repo + "/issues/new" %} -{% set takedowns_url = "https://safe.fiery.me/takedowns" %} -{% set server_location = "Paris, France" %} {# HTML supported #} -{% set support = 'Thanks! You can become a patron on my Patreon!' %} {# HTML supported #} +{% set takedowns_url = "https://safe.rita.moe/takedowns" %} +{% set server_location = "Nuremberg, Germany" %} {# HTML supported #} +{% set support = 'No Patreon in place for now.' %} {# HTML supported #} {% set enable_faq_banned_categories = true %} {% set enable_faq_tor = true %} @@ -35,29 +35,15 @@ { attrs: { title: 'Home', - href: 'https://fiery.me' + href: 'https://rita.moe' }, icon: 'icon-home icon-2x' }, - { - attrs: { - title: 'Blog (Gatsby)', - href: 'https://blog.fiery.me' - }, - icon: 'icon-gatsby icon-2x' - }, - { - attrs: { - title: 'Paste (PrivateBin)', - href: 'https://paste.fiery.me' - }, - icon: 'icon-privatebin icon-2x' - }, { attrs: { id: 'ShareX', title: 'ShareX user profile', - href: 'https://safe.fiery.me/safe.fiery.me.sxcu?v=' + v2 + href: 'https://safe.rita.moe/safe.rita.moe.sxcu?v=' + v2 }, icon: 'icon-sharex icon-2x' }, @@ -79,15 +65,6 @@ }, icon: 'icon-chrome icon-2x' }, - { - attrs: { - title: 'Bash uploader', - href: 'https://github.com/BobbyWibowo/uguush/tree/fiery-kde', - target: '_blank', - rel: 'noopener' - }, - icon: 'icon-terminal icon-2x' - }, { attrs: { title: 'FAQ', @@ -104,8 +81,8 @@ }, { attrs: { - title: 'View on GitHub', - href: 'https://github.com/BobbyWibowo/lolisafe', + title: 'View on Gitea', + href: 'https://git.rita.moe/rita/lolisafe', target: '_blank', rel: 'noopener' }, diff --git a/views/_layout.njk b/views/_layout.njk index 2466327..e45a82f 100644 --- a/views/_layout.njk +++ b/views/_layout.njk @@ -58,17 +58,16 @@ {% endblock %} - - - - - - + + + + + - + {% block endmeta %}{% endblock %} diff --git a/views/faq.njk b/views/faq.njk index dd5a94b..19602fb 100644 --- a/views/faq.njk +++ b/views/faq.njk @@ -179,17 +179,19 @@
We do have some browser extensions:
- Firefox extension. Maintained by me. Its GitHub repository is located here.
+ Firefox extension. Maintained by Bobby. Its GitHub repository is located here.
Chrome extension. Maintained by lolisafe's team. Its GitHub repository is located here.
- With the Chrome extension specifically, you will have to manually set the domain in the extension's settings to https://safe.fiery.me.
+ With the Chrome extension specifically, you will have to manually set the domain in the extension's settings to https://safe.rita.moe.

If you use Windows desktop, the safe support uploads from ShareX.
You can download the config file by clicking on the ShareX icon on the homepage.
When logged in, the config file will also be automatically populated with your account's token.
This will allow you to manage your ShareX uploads from our Dashboard.
+
diff --git a/views/home.njk b/views/home.njk index b41a194..624178e 100644 --- a/views/home.njk +++ b/views/home.njk @@ -31,7 +31,7 @@ {%- endif %} {# We assign an ID for this so that the script can find out version string for render images #} - +{# #} {# We assign an ID for this so that the script can find out its own version #}