Skip to content

Commit 87824ee

Browse files
authored
Merge pull request #1 from arabcoders/dev
Drop redis and use sqlite + local disks
2 parents ff97ae7 + 05dbc38 commit 87824ee

File tree

92 files changed

+7620
-1717
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+7620
-1717
lines changed

.env.example

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
1-
# Redis URL
2-
REDIS_URL=redis://localhost:6379
1+
# Place to store data.
2+
STORAGE_PATH=./var/files
33

4-
# Session Configuration
4+
# Data Retention (in days)
55
SESSION_TTL_DAYS=30
6+
TOKEN_TTL_DAYS=30
67
REQUEST_TTL_DAYS=7
78

9+
# Scheduled Cleanup
10+
# Set to 'false' to disable automatic cleanup
11+
CLEANUP_ENABLED=true
12+
# Set to 'false' to skip cleanup on startup (only run on schedule)
13+
CLEANUP_ON_STARTUP=true
14+
# How often to run cleanup (in hours)
15+
CLEANUP_INTERVAL_HOURS=1
16+
817
# Trust proxy for client IP detection
918
TRUST_PROXY_CLIENT_IP=false
1019

@@ -14,9 +23,6 @@ TRUST_PROXY_CLIENT_IP=false
1423
AUTH_USERNAME=my_username
1524
AUTH_PASSWORD=my_super_secret_password
1625

17-
# Secret key for token generation (set in production), otherwise a random key is generated on each startup
18-
AUTH_SECRET=random_secret_key
19-
2026
# Enable session restore feature (enabled by default).
2127
# When enabled, users can use their friendly id to restore their session.
2228
SESSION_RESTORE_ENABLED=false

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
.nitro
66
.cache
77
dist
8-
var/
98
# Node dependencies
109
node_modules
1110

.vscode/settings.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
],
1818
"cSpell.words": [
1919
"autoresize",
20+
"detc",
2021
"fastly",
2122
"heroicons",
2223
"hgetall",
@@ -30,6 +31,7 @@
3031
"smembers",
3132
"sqlmap",
3233
"srem",
34+
"unixepoch",
3335
"Whois"
3436
]
3537
}

.vscode/tailwind.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,16 @@
7070
"url": "https://tailwindcss.com/docs/functions-and-directives#plugin"
7171
}
7272
]
73+
},
74+
{
75+
"name": "@config",
76+
"description": "Use the `@config` directive to specify a custom path to your Tailwind CSS configuration file. This is useful when your configuration file is not located at the default path (`tailwind.config.js`).\n```css\n@config './path/to/your/tailwind.config.js';\n```\n",
77+
"references": [
78+
{
79+
"name": "Tailwind Documentation",
80+
"url": "https://tailwindcss.com/docs/functions-and-directives#config"
81+
}
82+
]
7383
}
7484
]
7585
}

Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@ FROM node:20-bullseye-slim
1717
WORKDIR /app
1818

1919
COPY --from=base /app/.output /app
20+
COPY migrations/ /app/migrations
2021
COPY README.md /app
2122

2223
ENV NODE_ENV=production
23-
ENV REDIS_URL=redis://redis:6379
24+
ENV STORAGE_PATH=/config
2425

25-
EXPOSE 3000
26+
RUN mkdir -p /config
2627

27-
USER node
28+
EXPOSE 3000
2829

2930
CMD ["/usr/local/bin/node", "/app/server/index.mjs"]

0 commit comments

Comments
 (0)