mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Fix dockerfile
This commit is contained in:
parent
a221e6358e
commit
c64c34a9fb
@ -26,27 +26,15 @@ services:
|
|||||||
front:
|
front:
|
||||||
build:
|
build:
|
||||||
context: ./front
|
context: ./front
|
||||||
dockerfile: Dockerfile.web.dev
|
dockerfile: Dockerfile.dev
|
||||||
volumes:
|
volumes:
|
||||||
- ./front:/app
|
- ./front:/app
|
||||||
- /app/.yarn
|
- /app/.yarn
|
||||||
- /app/node_modules
|
- /app/node_modules
|
||||||
- /app/packages/web/.next/
|
- /app/apps/web/.next/
|
||||||
|
- /app/apps/mobile/.expo/
|
||||||
ports:
|
ports:
|
||||||
- "3000:3000"
|
- "3000:3000"
|
||||||
restart: on-failure
|
|
||||||
environment:
|
|
||||||
- KYOO_URL=http://back:5000
|
|
||||||
native:
|
|
||||||
build:
|
|
||||||
context: ./front
|
|
||||||
dockerfile: Dockerfile.native.dev
|
|
||||||
volumes:
|
|
||||||
- ./front:/app
|
|
||||||
- /app/.yarn
|
|
||||||
- /app/node_modules
|
|
||||||
- /app/packages/native/.expo/
|
|
||||||
ports:
|
|
||||||
- "19000:19000"
|
- "19000:19000"
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
environment:
|
environment:
|
||||||
|
@ -11,3 +11,4 @@ README.md
|
|||||||
.git
|
.git
|
||||||
.yarn
|
.yarn
|
||||||
!.yarn/releases
|
!.yarn/releases
|
||||||
|
!.yarn/plugins
|
||||||
|
2
front/.gitignore
vendored
2
front/.gitignore
vendored
@ -35,7 +35,7 @@ yarn-error.log*
|
|||||||
*.tsbuildinfo
|
*.tsbuildinfo
|
||||||
|
|
||||||
.pnp.*
|
.pnp.*
|
||||||
.yarn
|
.yarn/*
|
||||||
!.yarn/patches
|
!.yarn/patches
|
||||||
!.yarn/plugins
|
!.yarn/plugins
|
||||||
!.yarn/releases
|
!.yarn/releases
|
||||||
|
28
front/.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
vendored
Normal file
28
front/.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -1,2 +1,7 @@
|
|||||||
yarnPath: .yarn/releases/yarn-3.2.4.cjs
|
|
||||||
nodeLinker: node-modules
|
nodeLinker: node-modules
|
||||||
|
|
||||||
|
plugins:
|
||||||
|
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
|
||||||
|
spec: "@yarnpkg/plugin-workspace-tools"
|
||||||
|
|
||||||
|
yarnPath: .yarn/releases/yarn-3.2.4.cjs
|
||||||
|
@ -3,9 +3,9 @@ WORKDIR /app
|
|||||||
COPY .yarn ./.yarn
|
COPY .yarn ./.yarn
|
||||||
COPY .yarnrc.yml ./
|
COPY .yarnrc.yml ./
|
||||||
COPY package.json yarn.lock ./
|
COPY package.json yarn.lock ./
|
||||||
COPY packages/web/package.json packages/web/package.json
|
COPY apps/web/package.json apps/web/package.json
|
||||||
COPY packages/native/package.json packages/native/package.json
|
COPY apps/mobile/package.json apps/mobile/package.json
|
||||||
COPY packages/app/package.json packages/app/package.json
|
COPY packages/ui/package.json packages/ui/package.json
|
||||||
RUN yarn --immutable
|
RUN yarn --immutable
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
@ -17,11 +17,10 @@ RUN yarn build:web
|
|||||||
FROM node:16-alpine
|
FROM node:16-alpine
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY --from=builder /app/packages/web/.next/standalone .
|
COPY --from=builder /app/apps/web/.next/standalone/apps/web .
|
||||||
COPY --from=builder /app/packages/web/.next/static ./.next/static/
|
COPY --from=builder /app/apps/web/.next/standalone/node_modules ./node_modules
|
||||||
COPY --from=builder /app/packages/web/public ./public
|
COPY --from=builder /app/apps/web/.next/static ./.next/static/
|
||||||
# Waiting for https://github.com/vercel/next.js/discussions/39432
|
COPY --from=builder /app/apps/web/public ./public
|
||||||
# COPY --from=builder /app/packages/web/node_modules ./node_modules/
|
|
||||||
|
|
||||||
EXPOSE 8901
|
EXPOSE 8901
|
||||||
ENV PORT 8901
|
ENV PORT 8901
|
||||||
|
13
front/Dockerfile.dev
Normal file
13
front/Dockerfile.dev
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
FROM node:16-alpine AS builder
|
||||||
|
WORKDIR /app
|
||||||
|
COPY .yarn ./.yarn
|
||||||
|
COPY .yarnrc.yml ./
|
||||||
|
COPY package.json yarn.lock ./
|
||||||
|
COPY apps/web/package.json apps/web/package.json
|
||||||
|
COPY apps/mobile/package.json apps/mobile/package.json
|
||||||
|
COPY packages/ui/package.json packages/ui/package.json
|
||||||
|
RUN yarn --immutable
|
||||||
|
|
||||||
|
EXPOSE 3000
|
||||||
|
EXPOSE 19000
|
||||||
|
CMD ["yarn", "dev"]
|
@ -1,14 +0,0 @@
|
|||||||
FROM node:16-alpine AS builder
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
COPY .yarn ./.yarn
|
|
||||||
COPY .yarnrc.yml ./
|
|
||||||
COPY package.json yarn.lock ./
|
|
||||||
COPY packages/web/package.json packages/web/package.json
|
|
||||||
COPY packages/native/package.json packages/native/package.json
|
|
||||||
COPY packages/app/package.json packages/app/package.json
|
|
||||||
RUN yarn --immutable
|
|
||||||
|
|
||||||
EXPOSE 19000
|
|
||||||
ENV PORT 19000
|
|
||||||
CMD ["yarn", "native"]
|
|
@ -1,15 +0,0 @@
|
|||||||
FROM node:16-alpine AS builder
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
COPY .yarn ./.yarn
|
|
||||||
COPY .yarnrc.yml ./
|
|
||||||
COPY package.json yarn.lock ./
|
|
||||||
COPY packages/web/package.json packages/web/package.json
|
|
||||||
COPY packages/native/package.json packages/native/package.json
|
|
||||||
COPY packages/app/package.json packages/app/package.json
|
|
||||||
RUN yarn --immutable
|
|
||||||
|
|
||||||
ENV NEXT_TELEMETRY_DISABLED 1
|
|
||||||
EXPOSE 3000
|
|
||||||
ENV PORT 3000
|
|
||||||
CMD ["yarn", "web"]
|
|
@ -3,7 +3,7 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"main": "src/app.tsx",
|
"main": "src/app.tsx",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "expo start",
|
"dev": "expo start",
|
||||||
"android": "expo start --android",
|
"android": "expo start --android",
|
||||||
"ios": "expo start --ios",
|
"ios": "expo start --ios",
|
||||||
"web": "expo start --web"
|
"web": "expo start --web"
|
||||||
|
@ -67,6 +67,9 @@ const nextConfig = {
|
|||||||
locales: ["en", "fr"],
|
locales: ["en", "fr"],
|
||||||
defaultLocale: "en",
|
defaultLocale: "en",
|
||||||
},
|
},
|
||||||
|
experimental: {
|
||||||
|
outputFileTracingRoot: path.join(__dirname, '../../'),
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (process.env.NODE_ENV !== "production") {
|
if (process.env.NODE_ENV !== "production") {
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
"name": "kyoo",
|
"name": "kyoo",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"dev": "yarn workspaces foreach -pi run dev",
|
||||||
"web": "yarn workspace web dev",
|
"web": "yarn workspace web dev",
|
||||||
"mobile": "yarn workspace mobile start",
|
"mobile": "yarn workspace mobile start",
|
||||||
"build:web": "yarn workspace web build",
|
"build:web": "yarn workspace web build",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Button } from "react-native";
|
import { Button } from "react-native";
|
||||||
|
|
||||||
export const Toto = () => {
|
export const Toto = () => {
|
||||||
return <Button title="tato"></Button>;
|
return <Button title="test"></Button>;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user