Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Themes Branch #9

Closed
wants to merge 221 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
221 commits
Select commit Hold shift + click to select a range
2972879
Font size
Loudbooks Jul 12, 2024
0650549
Fix website link
matytyma Jul 26, 2024
8df1290
Merge pull request #6 from matytyma/patch-1
Loudbooks Jul 27, 2024
ecf86c6
Title
Loudbooks Jul 29, 2024
9aaad69
Merge remote-tracking branch 'origin/master'
Loudbooks Jul 29, 2024
c7588b8
Run on mount
Loudbooks Jul 29, 2024
d540835
Change location
Loudbooks Jul 29, 2024
a3b4aba
Run in load handler
Loudbooks Jul 29, 2024
b487465
Remove hover effect
Loudbooks Jul 31, 2024
a1e9e10
Bump svelte from 4.2.15 to 4.2.19 in /website/pastebook
dependabot[bot] Sep 3, 2024
981fa56
Merge pull request #7 from Loudbooks/dependabot/npm_and_yarn/website/…
Loudbooks Sep 3, 2024
777e255
Match paste link
Loudbooks Sep 27, 2024
dc26406
Match paste link impl
Loudbooks Sep 27, 2024
d8fed9d
Use p
Loudbooks Sep 27, 2024
6307c7a
Change ID system
Loudbooks Sep 27, 2024
3912acf
Update README.md
Loudbooks Oct 4, 2024
019f8bf
Update README.md
Loudbooks Oct 4, 2024
28ab6ee
Remove Discord hook
Loudbooks Oct 5, 2024
136d295
Merge remote-tracking branch 'origin/master'
Loudbooks Oct 5, 2024
66aebdc
Unselect line
Loudbooks Oct 5, 2024
1bd2c39
Refactor & Cookie Inspection Control
Loudbooks Oct 11, 2024
3ad169d
Fix list endpoint
Loudbooks Oct 11, 2024
1382369
Fix list endpoint
Loudbooks Oct 11, 2024
db7d6e0
Fix content scanning issue
Loudbooks Oct 11, 2024
eeddcfd
Expire time
Loudbooks Oct 11, 2024
74d5ea8
Adjust Home Screen
Loudbooks Oct 11, 2024
2628b95
Fix Selection
Loudbooks Oct 13, 2024
c2d5d23
Adjust Margin
Loudbooks Oct 13, 2024
0261a42
Fix Highlight
Loudbooks Oct 13, 2024
35b2e61
Extra Space
Loudbooks Oct 27, 2024
baf6f21
GZip Compression
Loudbooks Dec 3, 2024
d0d3c16
GZip Cleanup
Loudbooks Dec 3, 2024
3edc3cc
Refactor
Loudbooks Dec 3, 2024
ccff72e
Change Endpoint
Loudbooks Dec 3, 2024
e386356
Dockerize Backend
Loudbooks Dec 3, 2024
a687192
Dockerize Frontend
Loudbooks Dec 3, 2024
9d580da
Remove Panel
Loudbooks Dec 3, 2024
02c9ae5
Cleanup
Loudbooks Dec 3, 2024
3436c58
Use Bucket Name
Loudbooks Dec 3, 2024
303c061
Recommit Properties
Loudbooks Dec 3, 2024
6d8fbfc
Create docker-build-publish.yml
Loudbooks Dec 3, 2024
ba424f8
Create build-and-deploy.yml
Loudbooks Dec 3, 2024
8d61f4c
Update build-and-deploy.yml
Loudbooks Dec 3, 2024
5f91f62
Gradle Wrapper
Loudbooks Dec 3, 2024
9bcc85b
Merge remote-tracking branch 'origin/docker' into docker
Loudbooks Dec 3, 2024
9561997
Update build-and-deploy.yml
Loudbooks Dec 3, 2024
957a68e
Update build-and-deploy.yml
Loudbooks Dec 3, 2024
9b52f70
Update build-and-deploy.yml
Loudbooks Dec 3, 2024
264cc1f
Update build-and-deploy.yml
Loudbooks Dec 3, 2024
d209898
Update build-and-deploy.yml
Loudbooks Dec 3, 2024
52ffcf2
Update build-and-deploy.yml
Loudbooks Dec 3, 2024
4935058
Update build-and-deploy.yml
Loudbooks Dec 3, 2024
4ba7746
Update build-and-deploy.yml
Loudbooks Dec 3, 2024
2c16599
Update build-and-deploy.yml
Loudbooks Dec 3, 2024
fd64cdf
Update README.md
Loudbooks Dec 3, 2024
20ade9b
Update README.md
Loudbooks Dec 3, 2024
97f65c2
Change to S3
Loudbooks Dec 3, 2024
56179ee
Merge remote-tracking branch 'refs/remotes/origin/docker' into docker
Loudbooks Dec 3, 2024
109a560
Update README.md
Loudbooks Dec 3, 2024
5391a2f
Remove environmental variable
Loudbooks Dec 3, 2024
019f03d
Fix error
Loudbooks Dec 3, 2024
382e5b0
Re-Add Submit Class
Loudbooks Dec 3, 2024
dbd3327
Update README.md
Loudbooks Dec 3, 2024
a426ffb
Fixes
Loudbooks Dec 4, 2024
719f7d1
Update README.md
Loudbooks Dec 4, 2024
14a874e
Merge pull request #8 from Loudbooks/docker
Loudbooks Dec 4, 2024
3d92488
Add host domain for old API endpoint
Loudbooks Dec 4, 2024
8ece3e4
Update docker-build-publish.yml
Loudbooks Dec 4, 2024
d9fa9f0
Update docker-build-publish.yml
Loudbooks Dec 4, 2024
a6510e8
Delete .github/workflows/docker-build-publish.yml
Loudbooks Dec 4, 2024
52c80f1
Update build-and-deploy.yml
Loudbooks Dec 4, 2024
c793d3a
Remove X prefix
Loudbooks Dec 4, 2024
5304d87
Merge remote-tracking branch 'origin/master'
Loudbooks Dec 4, 2024
2a34c5f
Revert X Prefix
Loudbooks Dec 4, 2024
c216176
Fix Git cache
Loudbooks Dec 4, 2024
764d3fe
Preload Fonts
Loudbooks Dec 4, 2024
38bc72b
Update README.md
Loudbooks Dec 4, 2024
9fb4f0b
Update README.md
Loudbooks Dec 4, 2024
838b67b
Change to Backend Endpoint
Loudbooks Dec 4, 2024
fe5ce94
Merge remote-tracking branch 'refs/remotes/origin/master'
Loudbooks Dec 4, 2024
b101cfa
Update font pull
Loudbooks Dec 4, 2024
4ca847b
Remove active change
Loudbooks Dec 4, 2024
d919376
Add -d to docker compose command
Loudbooks Dec 4, 2024
b1dcb1f
Update README.md
Loudbooks Dec 4, 2024
f546187
Update README.md
Loudbooks Dec 4, 2024
ae9593a
Update Packages
Loudbooks Dec 4, 2024
7e79186
Merge remote-tracking branch 'refs/remotes/origin/master'
Loudbooks Dec 4, 2024
218a2b0
Change user ID system
Loudbooks Dec 4, 2024
72b4db2
Improve logging
Loudbooks Dec 4, 2024
5ba633c
Fix Deprecation
Loudbooks Dec 4, 2024
0041643
Fix potential logging conflict
Loudbooks Dec 5, 2024
007d28d
Update Java & Kotlin
Loudbooks Dec 5, 2024
798b4cb
Update build-and-deploy.yml
Loudbooks Dec 5, 2024
e07f130
Seperate content and metadata requests
Loudbooks Dec 5, 2024
054efd0
Merge remote-tracking branch 'refs/remotes/origin/master'
Loudbooks Dec 5, 2024
50a1c04
Update build-and-deploy.yml
Loudbooks Dec 6, 2024
47bf7e1
Update build-and-deploy.yml
Loudbooks Dec 6, 2024
403dd26
Commit Hash
Loudbooks Dec 6, 2024
14856d9
Merge remote-tracking branch 'refs/remotes/origin/master'
Loudbooks Dec 6, 2024
83e3b52
Reorganize Dockerfile
Loudbooks Dec 6, 2024
77d2f0a
Update README.md
Loudbooks Dec 6, 2024
a027f74
Customizable title and description
Loudbooks Dec 6, 2024
a63fdba
Merge remote-tracking branch 'refs/remotes/origin/master'
Loudbooks Dec 6, 2024
4206125
Update README.md
Loudbooks Dec 6, 2024
40fba1f
Update Embeds
Loudbooks Dec 6, 2024
faffc48
Merge remote-tracking branch 'refs/remotes/origin/master'
Loudbooks Dec 6, 2024
0c1f695
Update Page Title
Loudbooks Dec 6, 2024
e6266b3
Update build-and-deploy.yml
Loudbooks Dec 6, 2024
f26e212
Change loudbook to loudbooks
Loudbooks Dec 6, 2024
9b301cf
Update README.md
Loudbooks Dec 6, 2024
c721d3e
Fix Deprecation
Loudbooks Dec 6, 2024
5e08c21
Fix localhost submission
Loudbooks Dec 6, 2024
8b1b5df
Merge remote-tracking branch 'refs/remotes/origin/master'
Loudbooks Dec 6, 2024
351aaa6
Create docker-compose.yml
Loudbooks Dec 6, 2024
d3812f5
Create pastebook.conf
Loudbooks Dec 6, 2024
85dc789
Upgrade AWS API
Loudbooks Dec 6, 2024
85c7cc1
Merge remote-tracking branch 'refs/remotes/origin/master'
Loudbooks Dec 6, 2024
c0f7af2
Create installation script
Loudbooks Dec 6, 2024
da4b2b7
Remove newlines
Loudbooks Dec 6, 2024
e5f4ba2
Update README.md
Loudbooks Dec 6, 2024
d8745ab
Update README.md
Loudbooks Dec 6, 2024
c6cbcc5
Update build-and-deploy.yml
Loudbooks Dec 6, 2024
05089b4
Remove debug
Loudbooks Dec 6, 2024
be02211
Merge remote-tracking branch 'origin/master'
Loudbooks Dec 6, 2024
3305716
Update README.md
Loudbooks Dec 7, 2024
eb54c18
Update README.md
Loudbooks Dec 7, 2024
fe58492
Allow disabling of new page
Loudbooks Dec 7, 2024
d0dbf06
Merge remote-tracking branch 'refs/remotes/origin/master'
Loudbooks Dec 7, 2024
e00b95b
Update docker-compose.yml
Loudbooks Dec 7, 2024
bc33f9a
Update README.md
Loudbooks Dec 7, 2024
46d673f
Update install.sh
Loudbooks Dec 7, 2024
9b668d0
Merge remote-tracking branch 'refs/remotes/origin/master'
Loudbooks Dec 7, 2024
bbbf66f
Fix env check
Loudbooks Dec 7, 2024
48ddd87
Update install.sh
Loudbooks Dec 7, 2024
7f32a46
Update README.md
Loudbooks Dec 7, 2024
2438eb0
Change Submit Animation
Loudbooks Dec 7, 2024
f0216ca
Merge remote-tracking branch 'refs/remotes/origin/master'
Loudbooks Dec 7, 2024
6bc540c
Fix variable title height
Loudbooks Dec 7, 2024
4fec11f
Adjust spacing
Loudbooks Dec 7, 2024
58f8ef0
Fix title height issue
Loudbooks Dec 7, 2024
7d729bc
Fix Certbot compatibility
Loudbooks Dec 7, 2024
24f92ec
Update pastebook.conf
Loudbooks Dec 7, 2024
c996b04
Update README.md
Loudbooks Dec 7, 2024
3dbb7e7
Update pastebook.conf
Loudbooks Dec 7, 2024
0aeae31
Update pastebook.conf
Loudbooks Dec 7, 2024
d6c7c0d
Add custon favicon support
Loudbooks Dec 8, 2024
2d23746
Merge remote-tracking branch 'refs/remotes/origin/master'
Loudbooks Dec 8, 2024
2e2d495
Update README.md
Loudbooks Dec 8, 2024
a807ae2
Render HTML for description
Loudbooks Dec 8, 2024
4bff850
Merge remote-tracking branch 'refs/remotes/origin/master'
Loudbooks Dec 8, 2024
1ad7ed8
Remove settings when DISABLE_NEW=TRUE
teakivy Dec 8, 2024
b9bd9cf
Made /settings Error 404 when DISABLE_NEW=TRUE
teakivy Dec 8, 2024
e5c9fa2
Remove debugs
teakivy Dec 8, 2024
5c32a02
Variable loading title
Loudbooks Dec 8, 2024
1da60e0
Remove loading title on about page
Loudbooks Dec 8, 2024
8276849
Remove uneccessary import
Loudbooks Dec 8, 2024
cb32252
Update build-and-deploy.yml
Loudbooks Dec 8, 2024
69425e5
Merge pull request #10 from teakivy/master
Loudbooks Dec 8, 2024
b15b132
Fix line number link
Loudbooks Dec 8, 2024
ad6f72e
Merge remote-tracking branch 'refs/remotes/origin/master'
Loudbooks Dec 8, 2024
6148721
Update ID migration
Loudbooks Dec 9, 2024
1e1255e
Use margin as opposed to padding
Loudbooks Dec 9, 2024
9e92335
Begin rust rewrite
Loudbooks Dec 10, 2024
e229516
Cargo
Loudbooks Dec 10, 2024
758807a
Formatting
Loudbooks Dec 10, 2024
faadc29
Fixes
Loudbooks Dec 10, 2024
8292dc8
Update docker-compose.yml
Loudbooks Dec 10, 2024
0eadec5
Update build-and-deploy.yml
Loudbooks Dec 10, 2024
8433a3e
CORS
Loudbooks Dec 10, 2024
e43606d
Merge remote-tracking branch 'origin/rust' into rust
Loudbooks Dec 10, 2024
41d4e06
Update build-and-deploy.yml
Loudbooks Dec 10, 2024
a66a8f0
Use bucket name for database
Loudbooks Dec 10, 2024
10285db
Merge remote-tracking branch 'origin/dev' into dev
Loudbooks Dec 10, 2024
8d8ac71
Update build-and-deploy.yml
Loudbooks Dec 10, 2024
5c29738
Update build-and-deploy.yml
Loudbooks Dec 10, 2024
e5deff9
Optimize Dockerfile
Loudbooks Dec 10, 2024
537a688
Merge remote-tracking branch 'origin/dev' into dev
Loudbooks Dec 10, 2024
d2d6183
Target
Loudbooks Dec 10, 2024
4792ebd
Cors fix
Loudbooks Dec 10, 2024
c1019da
Ubuntu
Loudbooks Dec 10, 2024
8682144
Ubuntu Noble
Loudbooks Dec 10, 2024
84c67a6
Alpine
Loudbooks Dec 10, 2024
ac33784
24.04
Loudbooks Dec 10, 2024
d9d2507
Bullseye
Loudbooks Dec 10, 2024
a4e2492
Bookwork
Loudbooks Dec 10, 2024
1b09246
Bookworm
Loudbooks Dec 10, 2024
9dede69
Target musl
Loudbooks Dec 10, 2024
5395881
MUSL Tools
Loudbooks Dec 10, 2024
acab86f
Fix path
Loudbooks Dec 10, 2024
4419650
Non slim
Loudbooks Dec 10, 2024
fee9cd3
dockerignore
Loudbooks Dec 11, 2024
0d86777
Revert dockerignore
Loudbooks Dec 11, 2024
b143bef
alpine all
Loudbooks Dec 11, 2024
990b453
Cleanup
Loudbooks Dec 11, 2024
a0c2b85
Update README.md
Loudbooks Dec 11, 2024
af53acd
Update build-and-deploy.yml
Loudbooks Dec 11, 2024
0029c9e
Rename to expiresAt
Loudbooks Dec 11, 2024
98c693a
Merge remote-tracking branch 'origin/dev' into dev
Loudbooks Dec 11, 2024
7e8c027
Change to matrix build
Loudbooks Dec 11, 2024
1d6956f
Don't need to rename
Loudbooks Dec 11, 2024
04ff54c
Merge remote-tracking branch 'origin/dev' into dev
Loudbooks Dec 11, 2024
1dd34cb
Update build-and-deploy.yml
Loudbooks Dec 11, 2024
f3a4712
Update build-and-deploy.yml
Loudbooks Dec 11, 2024
b08a41f
Update build-and-deploy.yml
Loudbooks Dec 11, 2024
e0e93e2
No need for dotenv
Loudbooks Dec 11, 2024
d7b2e61
Merge remote-tracking branch 'origin/dev' into dev
Loudbooks Dec 11, 2024
efd6e0b
Fewer dependencies
Loudbooks Dec 11, 2024
1c1ddb0
Merge branch 'master' into dev
Loudbooks Dec 11, 2024
ffeefca
Test MacOS Build
Loudbooks Dec 11, 2024
b43ca5b
Update build-and-deploy.yml
Loudbooks Dec 11, 2024
ee764ae
MongoDB Migration
Loudbooks Dec 11, 2024
36f2f27
Update expires tag
Loudbooks Dec 11, 2024
451ce14
Missing return statement
Loudbooks Dec 11, 2024
6fceb7e
Rust Rewrite
Loudbooks Dec 12, 2024
a3aeae0
Max payload configurable
Loudbooks Dec 12, 2024
34ca45a
MAX_PAYLOAD_SIZE
Loudbooks Dec 12, 2024
e1e72cb
Update pastebook.conf
Loudbooks Dec 12, 2024
2625d97
Update README.md
Loudbooks Dec 12, 2024
1e8c9e6
Improve logging
Loudbooks Dec 12, 2024
c5965a8
Merge remote-tracking branch 'origin/master'
Loudbooks Dec 12, 2024
7affa01
Fix ID Key
Loudbooks Dec 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Build and Publish Docker Images

on:
workflow_dispatch:
push:
paths:
- frontend/**
- backend/**
branches:
- master
- dev

jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write
strategy:
matrix:
component: [frontend, backend]
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Get Commit Hash
id: get_commit_hash
run: echo "hash=$(git rev-parse --short HEAD)" >> $GITHUB_ENV

- name: Set Docker Tags
id: set_tags
run: |
if [ "${{ github.ref_name }}" == "master" ]; then
echo "tag=latest" >> $GITHUB_ENV
elif [ "${{ github.ref_name }}" == "dev" ]; then
echo "tag=dev" >> $GITHUB_ENV
else
echo "Unknown branch: ${{ github.ref_name }}"
exit 1
fi

- name: Build and push Docker image to GHCR
uses: docker/build-push-action@v3
with:
context: ./${{ matrix.component }}
file: ./${{ matrix.component }}/Dockerfile
build-args: |
COMMIT_HASH=${{ env.hash }}
push: true
tags: |
ghcr.io/loudbooks/pastebook-${{ matrix.component }}:${{ env.tag }}
ghcr.io/loudbooks/pastebook-${{ matrix.component }}:${{ env.hash }}

- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Build and push Docker image to Docker Hub
uses: docker/build-push-action@v3
with:
context: ./${{ matrix.component }}
file: ./${{ matrix.component }}/Dockerfile
build-args: |
COMMIT_HASH=${{ env.hash }}
push: true
tags: |
${{ secrets.DOCKER_USERNAME }}/pastebook-${{ matrix.component }}:${{ env.tag }}
${{ secrets.DOCKER_USERNAME }}/pastebook-${{ matrix.component }}:${{ env.hash }}
44 changes: 4 additions & 40 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,41 +1,5 @@
HELP.md
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### IntelliJ IDEA ###
.*
!.gitignore
docker-compose.yml
.idea
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/

### Kotlin ###
.kotlin
src/main/resources/application.properties
/backend/target
95 changes: 86 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,86 @@
<div align="center">
<h1>PasteBook</h1>
<p>PasteBook is an aesthetic, effortless way to share your blocks of text, and respects your privacy by automatically deleting your pastes.</p>

![Static Badge](https://img.shields.io/badge/Website-brightgreen?style=for-the-badge&link=https%3A%2F%2Fpastebook.dev)

</div>

PasteBook was created with the intention of being used as a quick-and-easy solution to sharing temporary data with others. All data is to be deleted after 24 hours, unless specified otherwise.
# PasteBook
An easy on the eyes, portable, lightning fast pastebin written in Svelte and Rust.

### Prerequisites
Docker. Both the frontend and backend are to be installed with Docker. You can learn more [here](https://www.docker.com).

## Installation
The following is a guide to get PasteBook running on your system under your domain with SSL. All of this was tested on Ubuntu Linux.

### Preparation
Download `docker-compose.yml` [here](https://github.com/Loudbooks/PasteBook/blob/master/docker-compose.yml).

### Configuration
> [!CAUTION]
> Do not modify `docker-compose.yml`. You will break things.

Create a file by the name of `.env` in the same directory as `docker-compose.yml`. Add the following.
```env
TITLE=
DESCRIPTION=
DISABLE_NEW=
FAVICON_URL=
MAX_PAYLOAD_SIZE=
```

All of the following are optional. You can leave it all blank, or not even have a `.env` file at all.

`TITLE` - The title to be used around PasteBook.

`DESCRIPTION` - The description to be used in embeds and on the home page of PasteBook.

`DISABLE_NEW` - Disables the new paste page. API is still accessible.

`FAVICON_URL` - The URL that the favicon will be provided with.

`MAX_PAYLOAD_SIZE` - The maximum paste size in megabytes.

### Creation
Run the following.
```bash
docker compose up -d
```

Awesome! PasteBook is now running.

## Nginx Configuration
In order to run PasteBook under a domain, you will need to use a reverse proxy. The following will serve as a guide to setting up Nginx.

### Prerequisites
- PasteBook is fully installed with the instructions above.
- A working Nginx installation. Learn more [here](https://nginx.org/en/linux_packages.html#instructions).
- A working Certbot installation. Learn more [here](https://certbot.eff.org/instructions?ws=nginx&os=snap).
## Nginx Preparation
Navigate to `/etc/nginx/sites-enabled`.

## Domain Preparation
You will need to create a DNS A record pointing to your machine with the root and with the `api.` prefix. I use CloudFlare.

### Configuration
Download `pastebook.conf` [here](https://github.com/Loudbooks/PasteBook/blob/master/pastebook.conf).

`<DOMAIN>` - Change this to your domain name. For example, mine is `pastebook.dev`.

### SSL Configuration
Run the following, with `<DOMAIN>` changed to your domain.
```bash
sudo certbot certonly --standalone -d <DOMAIN> -d api.<DOMAIN>
```
### Committing Changes
Run the following.
```bash
systemctl restart nginx
```

# Updating PasteBook
Run the following commands in succession.
```bash
docker compose stop
docker compose pull
docker compose up -d
```

# Final Notes
Wow. There was a lot that can go wrong there. I'm not an expert. If you need help, you can email me at [email protected] or find me elsewhere.

💜
Loading
Loading