Skip to content

Commit 37191e4

Browse files
committed
Initial commit
0 parents  commit 37191e4

19 files changed

Lines changed: 208 additions & 0 deletions
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: rex-deployment
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths-ignore:
8+
- "**.md"
9+
pull_request:
10+
branches-ignore:
11+
- main
12+
13+
jobs:
14+
rex-deploy:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: rex-7567-e27
18+
uses: mbaraa/rex-action@v1.6
19+
with:
20+
server-url: ${{ secrets.REX_SERVER }}
21+
token: ${{ secrets.REX_KEY }}
22+
repo-name: dankstuff.net

Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM golang:1.24-alpine AS build
2+
3+
WORKDIR /app
4+
COPY . .
5+
6+
RUN go mod tidy
7+
RUN go build -ldflags="-w -s" ./...
8+
9+
FROM alpine:latest AS run
10+
11+
WORKDIR /app
12+
13+
COPY --from=build /app/dankstuff.net ./dankstuff.net
14+
COPY --from=build /app/templates ./templates
15+
16+
EXPOSE 8080
17+
18+
CMD ["./dankstuff.net"]

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# dankstuff.net
2+
3+
Dank Stuff Listing:
4+
5+
- [DankMuzikk](https://dankmuzikk.com): Create, Share and Play Music Playlists.
6+
- [DankLyrics](https://danklyrics.com): Find lyrics for songs or something.
7+
- [DankScreen](https://screen.dankstuff.net): Display capture card's output into your browser.
8+
- [DankDysk](https://dankdysk.com): Magical unlimited cloud drive. (WIP)
9+
- [DankTorrent](https://dankdysk.com): Download anything as torrent. (WIP)
10+
- [DankIP](https://dankip.com): Get a public IP for any server/computer. (WIP)
11+
- [libdank](https://libdank.org): File compression extension but the result is a video. (WIP)

docker-compose.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
services:
2+
app:
3+
container_name: "dankstuff.net"
4+
build:
5+
dockerfile: Dockerfile
6+
context: .
7+
image: "dankstuff.net"
8+
restart: "always"
9+
ports:
10+
- "42069:8080"
11+
stdin_open: true

go.mod

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module dankstuff.net
2+
3+
go 1.24

main.go

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
package main
2+
3+
import (
4+
"embed"
5+
"fmt"
6+
"html/template"
7+
"log"
8+
"math/rand"
9+
"net/http"
10+
)
11+
12+
var (
13+
//go:embed templates
14+
aaa embed.FS
15+
16+
//go:embed static
17+
bbb embed.FS
18+
)
19+
20+
func main() {
21+
t := template.Must(template.ParseFS(aaa, "templates/index.gohtml"))
22+
23+
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
24+
_ = t.Execute(w, map[string]any{
25+
"BG": fmt.Sprintf("/static/bgs/%d.webp", rand.Intn(5)+1),
26+
"Deployments": []struct {
27+
Title string
28+
Link string
29+
Description string
30+
}{
31+
32+
{Title: "DankMuzikk", Link: "https://dankmuzikk.com", Description: "Create, Share and Play Music Playlists."},
33+
{Title: "DankLyrics", Link: "https://danklyrics.com", Description: "Find lyrics for songs or something."},
34+
{Title: "DankScreen", Link: "https://screen.dankstuff.net", Description: "Display capture card's output into your browser."},
35+
{Title: "DankDysk", Link: "https://dankdysk.com", Description: "Magical unlimited cloud drive. (WIP)"},
36+
{Title: "DankTorrent", Link: "https://dankdysk.com", Description: "Download anything as torrent. (WIP)"},
37+
{Title: "DankIP", Link: "https://dankip.com", Description: "Get a public IP for any server/computer. (WIP)"},
38+
{Title: "libdank", Link: "https://libdank.org", Description: "File compression extension but the result is a video. (WIP)"},
39+
},
40+
})
41+
})
42+
http.Handle("/static/", http.FileServer(http.FS(bbb)))
43+
log.Println("server running on port 8080")
44+
log.Fatalln(http.ListenAndServe(":8080", nil))
45+
}

static/apple-touch-icon.png

6.61 KB
Loading

static/bgs/1.webp

97.6 KB
Loading

static/bgs/2.webp

60.5 KB
Loading

static/bgs/3.webp

335 KB
Loading

0 commit comments

Comments
 (0)