mirror of
https://github.com/twentyhq/twenty.git
synced 2025-01-03 01:34:08 +03:00
Fix server local build (#75)
* Fix server local build * Build docs locally and for prod --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
parent
ae7bad65ca
commit
d2c6a71c9e
@ -4,7 +4,7 @@
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"docusaurus": "docusaurus",
|
||||
"start": "docusaurus start",
|
||||
"start": "docusaurus start --host 0.0.0.0",
|
||||
"build": "docusaurus build",
|
||||
"swizzle": "docusaurus swizzle",
|
||||
"deploy": "docusaurus deploy",
|
||||
|
@ -2,6 +2,7 @@ build: ##
|
||||
@docker-compose down
|
||||
docker volume rm dev_twenty_node_modules_front || true
|
||||
docker volume rm dev_twenty_node_modules_server || true
|
||||
docker volume rm dev_twenty_node_modules_docs || true
|
||||
docker-compose build
|
||||
|
||||
up: ##
|
||||
|
@ -74,7 +74,7 @@ services:
|
||||
- "1025:1025"
|
||||
- "8025:8025"
|
||||
twenty-server:
|
||||
build:
|
||||
build:
|
||||
context: ../..
|
||||
dockerfile: ./infra/dev/server/Dockerfile
|
||||
ports:
|
||||
@ -87,6 +87,15 @@ services:
|
||||
SERVER_DATABASE_URL: ${SERVER_DATABASE_URL}
|
||||
depends_on:
|
||||
- postgres
|
||||
twenty-docs:
|
||||
build:
|
||||
context: ../..
|
||||
dockerfile: ./infra/dev/docs/Dockerfile
|
||||
ports:
|
||||
- "5000:3000"
|
||||
volumes:
|
||||
- ../../docs:/app/docs
|
||||
- twenty_node_modules_docs:/app/docs/node_modules
|
||||
postgres:
|
||||
build: ./postgres
|
||||
volumes:
|
||||
@ -98,4 +107,5 @@ services:
|
||||
volumes:
|
||||
db_data:
|
||||
twenty_node_modules_front:
|
||||
twenty_node_modules_server:
|
||||
twenty_node_modules_server:
|
||||
twenty_node_modules_docs:
|
11
infra/dev/docs/Dockerfile
Normal file
11
infra/dev/docs/Dockerfile
Normal file
@ -0,0 +1,11 @@
|
||||
FROM node:18.16.0-alpine as docs
|
||||
|
||||
WORKDIR /app/docs
|
||||
|
||||
COPY ../../docs/package.json .
|
||||
COPY ../../docs/package-lock.json .
|
||||
RUN npm install
|
||||
|
||||
COPY ../../docs .
|
||||
|
||||
CMD ["npm", "run", "start"]
|
@ -9,8 +9,9 @@ WORKDIR /app/server
|
||||
COPY ../../server/package.json .
|
||||
COPY ../../server/package-lock.json .
|
||||
RUN npm install
|
||||
RUN npx prisma generate
|
||||
|
||||
COPY ../../server/src/database/schema.prisma ./src/database/schema.prisma
|
||||
RUN npx prisma generate
|
||||
|
||||
COPY ../../server .
|
||||
|
||||
|
13
infra/prod/docs/Dockerfile
Normal file
13
infra/prod/docs/Dockerfile
Normal file
@ -0,0 +1,13 @@
|
||||
FROM node:18.16.0-alpine as docs
|
||||
|
||||
WORKDIR /app/docs
|
||||
|
||||
COPY ../../docs/package.json .
|
||||
COPY ../../docs/package-lock.json .
|
||||
RUN npm install
|
||||
|
||||
COPY ../../docs .
|
||||
|
||||
RUN npm install -g serve
|
||||
|
||||
CMD ["serve", "-s", "build"]
|
Loading…
Reference in New Issue
Block a user