mirror of
https://github.com/zoriya/Kyoo.git
synced 2026-06-05 04:39:27 +00:00
Add front dockerfile
This commit is contained in:
+9
-8
@@ -32,6 +32,7 @@ services:
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.front.rule=PathPrefix(`/`)"
|
||||
- "traefik.http.services.front.loadbalancer.server.port=8901"
|
||||
|
||||
auth:
|
||||
build: ./auth
|
||||
@@ -93,7 +94,7 @@ services:
|
||||
|
||||
transcoder:
|
||||
<<: *transcoder-base
|
||||
profiles: ['', 'cpu']
|
||||
profiles: ["", "cpu"]
|
||||
transcoder-nvidia:
|
||||
<<: *transcoder-base
|
||||
deploy:
|
||||
@@ -106,7 +107,7 @@ services:
|
||||
- nvidia.com/gpu=all
|
||||
environment:
|
||||
- GOCODER_HWACCEL=nvidia
|
||||
profiles: ['nvidia']
|
||||
profiles: ["nvidia"]
|
||||
transcoder-vaapi:
|
||||
<<: *transcoder-base
|
||||
devices:
|
||||
@@ -114,7 +115,7 @@ services:
|
||||
environment:
|
||||
- GOCODER_HWACCEL=vaapi
|
||||
- GOCODER_VAAPI_RENDERER=${GOCODER_VAAPI_RENDERER:-/dev/dri/renderD128}
|
||||
profiles: ['vaapi']
|
||||
profiles: ["vaapi"]
|
||||
# qsv is the same setup as vaapi but with the hwaccel env var different
|
||||
transcoder-qsv:
|
||||
<<: *transcoder-base
|
||||
@@ -123,7 +124,7 @@ services:
|
||||
environment:
|
||||
- GOCODER_HWACCEL=qsv
|
||||
- GOCODER_VAAPI_RENDERER=${GOCODER_VAAPI_RENDERER:-/dev/dri/renderD128}
|
||||
profiles: ['qsv']
|
||||
profiles: ["qsv"]
|
||||
|
||||
traefik:
|
||||
image: traefik:v3.5
|
||||
@@ -146,10 +147,10 @@ services:
|
||||
volumes:
|
||||
- db:/var/lib/postgresql/data
|
||||
environment:
|
||||
- POSTGRES_USER=$PGUSER
|
||||
- POSTGRES_PASSWORD=$PGPASSWORD
|
||||
- POSTGRES_DB=$PGDATABASE
|
||||
- POSTGRES_HOST_AUTH_METHOD=trust
|
||||
- POSTGRES_USER=$PGUSER
|
||||
- POSTGRES_PASSWORD=$PGPASSWORD
|
||||
- POSTGRES_DB=$PGDATABASE
|
||||
- POSTGRES_HOST_AUTH_METHOD=trust
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${PGUSER} -d ${PGDATABASE}"]
|
||||
interval: 5s
|
||||
|
||||
+23
-4
@@ -1,13 +1,32 @@
|
||||
FROM oven/bun AS builder
|
||||
WORKDIR /app
|
||||
|
||||
# idk why it doesnt' build without it
|
||||
RUN apt update && apt install -y nodejs && rm /usr/local/bun-node-fallback-bin/node
|
||||
|
||||
ENV NODE_ENV=production
|
||||
COPY package.json bun.lock scripts .
|
||||
COPY scripts scripts
|
||||
RUN bun install --production --frozen-lockfile
|
||||
RUN bun install --production
|
||||
|
||||
COPY . .
|
||||
RUN bun web
|
||||
|
||||
EXPOSE 8081
|
||||
CMD ["bun", "dev"]
|
||||
# TODO: replace this nginx with a SSR enabled server.
|
||||
FROM nginx
|
||||
EXPOSE 8901
|
||||
COPY <<EOF /etc/nginx/conf.d/default.conf
|
||||
server {
|
||||
listen 8901;
|
||||
charset utf-8;
|
||||
|
||||
# TODO: Actually do something there, either nginx or preferably an ssr bun serv
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files \$uri \$uri/ /index.html;
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
|
||||
@@ -25,6 +25,7 @@ export const expo: ExpoConfig = {
|
||||
},
|
||||
web: {
|
||||
favicon: "./public/icon-256x256.png",
|
||||
output: "single",
|
||||
bundler: "metro",
|
||||
},
|
||||
updates: {
|
||||
|
||||
+2
-2
@@ -14,6 +14,7 @@
|
||||
"@react-navigation/elements": "^2.6.4",
|
||||
"@react-navigation/native": "^7.1.8",
|
||||
"@tanstack/react-query": "^5.90.5",
|
||||
"@tanstack/react-query-devtools": "^5.90.2",
|
||||
"@types/langmap": "^0.0.3",
|
||||
"expo": "54.0.17",
|
||||
"expo-build-properties": "^1.0.9",
|
||||
@@ -41,6 +42,7 @@
|
||||
"react-native-safe-area-context": "5.6.1",
|
||||
"react-native-screens": "~4.16.0",
|
||||
"react-native-svg": "15.12.1",
|
||||
"react-native-svg-transformer": "^1.5.1",
|
||||
"react-native-video": "zoriya/react-native-video#build",
|
||||
"react-native-web": "^0.21.2",
|
||||
"react-native-worklets": "0.5.1",
|
||||
@@ -53,11 +55,9 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "2.2.6",
|
||||
"@tanstack/react-query-devtools": "^5.90.2",
|
||||
"@types/bun": "^1.3.0",
|
||||
"@types/react": "~19.1.10",
|
||||
"@types/react-dom": "~19.1.7",
|
||||
"react-native-svg-transformer": "^1.5.1",
|
||||
"typescript": "5.9.3",
|
||||
},
|
||||
},
|
||||
|
||||
+3
-2
@@ -6,6 +6,7 @@
|
||||
"scripts": {
|
||||
"postinstall": "bun ./scripts/postinstall.ts",
|
||||
"dev": "expo start",
|
||||
"web": "EXPO_NO_TELEMETRY=true expo export -p web",
|
||||
"apk": "eas build --profile preview --platform android --non-interactive --json",
|
||||
"apk:dev": "eas build --profile development --platform android --non-interactive",
|
||||
"lint": "biome lint .",
|
||||
@@ -24,6 +25,7 @@
|
||||
"@react-navigation/elements": "^2.6.4",
|
||||
"@react-navigation/native": "^7.1.8",
|
||||
"@tanstack/react-query": "^5.90.5",
|
||||
"@tanstack/react-query-devtools": "^5.90.2",
|
||||
"@types/langmap": "^0.0.3",
|
||||
"expo": "54.0.17",
|
||||
"expo-build-properties": "^1.0.9",
|
||||
@@ -51,6 +53,7 @@
|
||||
"react-native-safe-area-context": "5.6.1",
|
||||
"react-native-screens": "~4.16.0",
|
||||
"react-native-svg": "15.12.1",
|
||||
"react-native-svg-transformer": "^1.5.1",
|
||||
"react-native-video": "zoriya/react-native-video#build",
|
||||
"react-native-web": "^0.21.2",
|
||||
"react-native-worklets": "0.5.1",
|
||||
@@ -63,11 +66,9 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "2.2.6",
|
||||
"@tanstack/react-query-devtools": "^5.90.2",
|
||||
"@types/bun": "^1.3.0",
|
||||
"@types/react": "~19.1.10",
|
||||
"@types/react-dom": "~19.1.7",
|
||||
"react-native-svg-transformer": "^1.5.1",
|
||||
"typescript": "5.9.3"
|
||||
},
|
||||
"expo": {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM golang:1.25 as build
|
||||
FROM golang:1.25 AS build
|
||||
RUN apt-get update \
|
||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
||||
ffmpeg libavformat-dev libavutil-dev libswscale-dev \
|
||||
|
||||
Reference in New Issue
Block a user