Skip to content

Commit 4f38b4a

Browse files
committed
moved dtos within api folder
1 parent e512fab commit 4f38b4a

File tree

16 files changed

+155
-24
lines changed

16 files changed

+155
-24
lines changed

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

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+
}

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

src/lib/server/api/controllers/iam.controller.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import { LuciaProvider } from '../providers/lucia.provider';
77
import { limiter } from '../middlewares/rate-limiter.middlware';
88
import { requireAuth } from '../middlewares/auth.middleware';
99
import { Controler } from '../common/classes/controller.class';
10-
import { registerEmailDto } from '$lib/dtos/register-email.dto';
11-
import { signInEmailDto } from '$lib/dtos/signin-email.dto';
12-
import { updateEmailDto } from '$lib/dtos/update-email.dto';
13-
import { verifyEmailDto } from '$lib/dtos/verify-email.dto';
10+
import { registerEmailDto } from '$lib/server/api/dtos/register-email.dto';
11+
import { signInEmailDto } from '$lib/server/api/dtos/signin-email.dto';
12+
import { updateEmailDto } from '$lib/server/api/dtos/update-email.dto';
13+
import { verifyEmailDto } from '$lib/server/api/dtos/verify-email.dto';
1414

1515
@injectable()
1616
export class IamController extends Controler {
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/lib/dtos/verify-email.dto.ts renamed to src/lib/server/api/dtos/verify-email.dto.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ import { z } from 'zod';
33
export const verifyEmailDto = z.object({
44
token: z.string()
55
});
6+
67
export type VerifyEmailDto = z.infer<typeof verifyEmailDto>;

src/lib/server/api/queues.ts

Whitespace-only changes.

src/lib/server/api/services/iam.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { MailerService } from './mailer.service';
33
import { TokensService } from './tokens.service';
44
import { LuciaProvider } from '../providers/lucia.provider';
55
import { UsersRepository } from '../repositories/users.repository';
6-
import type { SignInEmailDto } from '../../../dtos/signin-email.dto';
7-
import type { RegisterEmailDto } from '../../../dtos/register-email.dto';
6+
import type { SignInEmailDto } from '../dtos/signin-email.dto';
7+
import type { RegisterEmailDto } from '../dtos/register-email.dto';
88
import { LoginRequestsRepository } from '../repositories/login-requests.repository';
99
import { LoginVerificationEmail } from '../emails/login-verification.email';
1010
import { DatabaseProvider } from '../providers/database.provider';

0 commit comments

Comments
 (0)