Skip to content

Commit 53ebe9a

Browse files
committed
Merge branch 'feature/project-restructure'
2 parents a286d60 + 70a0c74 commit 53ebe9a

Some content is hidden

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

68 files changed

+575
-375
lines changed

.env.example

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
1+
# API
12
ORIGIN=http://localhost:5173
23

34
# Database
45
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/postgres
5-
REDIS_URL=redis://localhost:6379
6+
7+
# Redis
8+
REDIS_URL=redis://localhost:6379
9+
10+
# Storage
11+
PUBLIC_IMAGE_URI=http://localhost:9000/dev
12+
STORAGE_BUCKET=dev
13+
STORAGE_URL=http://localhost:9000
14+
STORAGE_ACCESS_KEY=user
15+
STORAGE_SECRET_KEY=password

Dockerfile.minio

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM nginx:stable-alpine-slim
2+
COPY minio-console.conf.template /etc/nginx/templates/
3+
RUN rm /etc/nginx/conf.d/default.conf /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh

drizzle.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import type { Config } from 'drizzle-kit';
22

33
export default {
4-
out: './src/lib/server/api/databases/migrations',
5-
schema: './src/lib/server/api/databases/tables/*.table.ts',
4+
out: './src/lib/server/api/databases/postgres/migrations',
5+
schema: './src/lib/server/api/databases/postgres/tables/*.table.ts',
66
breakpoints: false,
77
strict: true,
88
dialect: 'postgresql',

minio-console.conf.template

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
upstream minio_console {
2+
server ${MINIO_HOST}:${MINIO_CONSOLE_PORT};
3+
}
4+
5+
server {
6+
listen ${PORT};
7+
8+
# Allow special characters in headers
9+
ignore_invalid_headers off;
10+
# Allow any size file to be uploaded.
11+
# Set to a value such as 1000m; to restrict file size to a specific value
12+
client_max_body_size 0;
13+
# Disable buffering
14+
proxy_buffering off;
15+
proxy_request_buffering off;
16+
17+
location / {
18+
proxy_set_header Host $http_host;
19+
proxy_set_header X-Real-IP $remote_addr;
20+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
21+
proxy_set_header X-Forwarded-Proto $scheme;
22+
proxy_set_header X-NginX-Proxy true;
23+
24+
# This is necessary to pass the correct IP to be hashed
25+
real_ip_header X-Real-IP;
26+
27+
proxy_connect_timeout 300;
28+
29+
# To support websockets in MinIO versions released after January 2023
30+
proxy_http_version 1.1;
31+
proxy_set_header Upgrade $http_upgrade;
32+
proxy_set_header Connection "upgrade";
33+
# Some environments may encounter CORS errors (Kubernetes + Nginx Ingress)
34+
# Uncomment the following line to set the Origin request to an empty string
35+
# proxy_set_header Origin '';
36+
37+
chunked_transfer_encoding off;
38+
39+
proxy_pass http://minio_console; # This uses the upstream directive definition to load balance
40+
}
41+
}

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@
8787
"mode-watcher": "^0.4.1",
8888
"paneforge": "^0.0.5",
8989
"rate-limit-redis": "^4.2.0",
90+
"redis": "^4.7.0",
91+
"redis-om": "^0.4.6",
9092
"resend": "^3.5.0",
9193
"svelte-sonner": "^0.3.27",
9294
"tailwind-merge": "^2.4.0",

pnpm-lock.yaml

Lines changed: 107 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

render.yaml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
services:
2+
# Web
23
- type: web
34
name: web
45
runtime: node
@@ -9,6 +10,21 @@ services:
910
startCommand: npm run db:migrate && node build/index.js
1011
healthCheckPath: /
1112
envVars:
13+
- key: STORAGE_API_SECRET_KEY
14+
fromService:
15+
name: minio-server
16+
type: web
17+
property: MINIO_ROOT_PASSWORD
18+
- key: STORAGE_ACCESS_KEY
19+
fromService:
20+
name: minio-server
21+
type: web
22+
property: MINIO_ROOT_USER
23+
- key: STORAGE_API_URL
24+
fromService:
25+
name: minio-server
26+
type: web
27+
property: connectionString
1228
- key: DATABASE_URL
1329
fromDatabase:
1430
name: tofustack
@@ -23,10 +39,62 @@ services:
2339
name: web
2440
type: web
2541
property: host
42+
# Redis
2643
- type: redis
2744
name: redis
2845
ipAllowList: [] # Only allow internal connections
2946

47+
# MinIO Server
48+
- type: web
49+
name: minio-server
50+
healthCheckPath: /minio/health/liveweb
51+
runtime: image
52+
image:
53+
url: docker.io/minio/minio:latest
54+
dockerCommand: minio server /data --address $HOST:$PORT --console-address $HOST:$CONSOLE_PORT
55+
# Use the following 'dockerCommand' if removing the 'minio-console'
56+
# web service
57+
# dockerCommand: minio server /data --address $HOST:$PORT
58+
autoDeploy: false
59+
disk:
60+
name: data
61+
mountPath: /data
62+
envVars:
63+
- key: MINIO_ROOT_USER
64+
generateValue: true
65+
- key: MINIO_ROOT_PASSWORD
66+
generateValue: true
67+
- key: HOST
68+
value: "0.0.0.0"
69+
- key: PORT
70+
value: 9000
71+
- key: CONSOLE_PORT
72+
value: 9090
73+
# Uncomment the following key/value pair if you are removing the
74+
# 'minio-console' web service
75+
# - key: MINIO_BROWSER
76+
# value: "off"
77+
# MinIO Console
78+
- type: web
79+
name: minio-console
80+
runtime: docker
81+
dockerContext: /
82+
dockerfilePath: ./Dockerfile.minio
83+
autoDeploy: false
84+
envVars:
85+
- key: PORT
86+
value: 10000
87+
- key: MINIO_HOST
88+
fromService:
89+
name: minio-server
90+
type: web
91+
property: host
92+
- key: MINIO_CONSOLE_PORT
93+
fromService:
94+
name: minio-server
95+
type: web
96+
envVarKey: CONSOLE_PORT
97+
3098
databases:
3199
- name: db
32100
databaseName: tofustack

0 commit comments

Comments
 (0)