Skip to content

Commit

Permalink
fix: dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
danilaplee committed Oct 20, 2024
1 parent 240421f commit 5e506e7
Showing 1 changed file with 69 additions and 1 deletion.
70 changes: 69 additions & 1 deletion apps/server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,75 @@ RUN pnpm build

RUN rm -rf /home/node/app/apps/server/.dockerignore

RUN ls /home/node/app/node_modules/
#REMOVE NOT RELATED STUFF
RUN rm -rf /home/node/app/apps/native

RUN rm -rf /home/node/app/apps/web

RUN rm -rf /home/node/app/pacakges/evolu-common-web

RUN rm -rf /home/node/app/pacakges/evolu-common-react

RUN rm -rf /home/node/app/pacakges/evolu-react

RUN rm -rf /home/node/app/pacakges/evolu-react-native

RUN rm -rf /home/node/app/examples/*

RUN pnpm i --shamefully-hoist

RUN pnpm build

RUN rm -rf /home/node/app/apps/server/.dockerignore

#FIX PNPM LINKING (DO NOT TOUCH!)
RUN mkdir /home/node/app/packages/evolu-server/node_modules/effect/
RUN mkdir /home/node/app/packages/evolu-common/node_modules/effect/
RUN mkdir /home/node/app/packages/evolu-common/node_modules/@effect/
RUN cp -r /home/node/app/node_modules/effect/* /home/node/app/packages/evolu-server/node_modules/effect/
RUN cp -r /home/node/app/node_modules/effect/* /home/node/app/packages/evolu-common/node_modules/effect/
RUN cp -r /home/node/app/node_modules/@effect/* /home/node/app/packages/evolu-common/node_modules/@effect/
RUN mkdir /home/node/app/packages/evolu-common/node_modules/@noble/
RUN mv /home/node/app/node_modules/@noble/* /home/node/app/packages/evolu-common/node_modules/@noble/
RUN mkdir /home/node/app/packages/evolu-common/node_modules/@protobuf-ts/
RUN mv /home/node/app/node_modules/@protobuf-ts/* /home/node/app/packages/evolu-common/node_modules/@protobuf-ts/
RUN mkdir /home/node/app/packages/evolu-common/node_modules/@scure/
RUN mv /home/node/app/node_modules/@scure/* /home/node/app/packages/evolu-common/node_modules/@scure/
RUN mkdir /home/node/app/packages/evolu-common/node_modules/fast-check/
RUN mv /home/node/app/node_modules/fast-check/* /home/node/app/packages/evolu-common/node_modules/fast-check/
RUN mkdir /home/node/app/packages/evolu-common/node_modules/find-my-way-ts/
RUN mv /home/node/app/node_modules/find-my-way-ts/* /home/node/app/packages/evolu-common/node_modules/find-my-way-ts/
RUN mkdir /home/node/app/packages/evolu-common/node_modules/multipasta/
RUN mv /home/node/app/node_modules/multipasta/* /home/node/app/packages/evolu-common/node_modules/multipasta/
RUN mkdir /home/node/app/packages/evolu-common/node_modules/pure-rand/
RUN mv /home/node/app/node_modules/pure-rand/* /home/node/app/packages/evolu-common/node_modules/pure-rand/
RUN mkdir /home/node/app/packages/evolu-server/node_modules/kysely/
RUN mkdir /home/node/app/packages/evolu-common/node_modules/kysely/
RUN cp -r /home/node/app/node_modules/kysely/* /home/node/app/packages/evolu-server/node_modules/kysely/
RUN cp -r /home/node/app/node_modules/kysely/* /home/node/app/packages/evolu-common/node_modules/kysely/
RUN mkdir /home/node/app/packages/evolu-server/node_modules/better-sqlite3/
RUN mv /home/node/app/node_modules/better-sqlite3/* /home/node/app/packages/evolu-server/node_modules/better-sqlite3/
RUN mkdir /home/node/app/packages/evolu-server/node_modules/express/
RUN mv /home/node/app/node_modules/express/* /home/node/app/packages/evolu-server/node_modules/express/
RUN mkdir /home/node/app/packages/evolu-server/node_modules/body-parser/
RUN mv /home/node/app/node_modules/body-parser/* /home/node/app/packages/evolu-server/node_modules/body-parser/
RUN mkdir /home/node/app/packages/evolu-server/node_modules/depd/
RUN mv /home/node/app/node_modules/depd/* /home/node/app/packages/evolu-server/node_modules/depd/
RUN mkdir /home/node/app/packages/evolu-server/node_modules/vary/
RUN mv /home/node/app/node_modules/vary/* /home/node/app/packages/evolu-server/node_modules/vary/
RUN mkdir /home/node/app/packages/evolu-server/node_modules/cors/
RUN mv /home/node/app/node_modules/cors/* /home/node/app/packages/evolu-server/node_modules/cors/
RUN mkdir /home/node/app/packages/evolu-server/node_modules/ws/
RUN mv /home/node/app/node_modules/ws/* /home/node/app/packages/evolu-server/node_modules/ws/
RUN mkdir /home/node/app/packages/evolu-server/node_modules/object-assign/
RUN mv /home/node/app/node_modules/object-assign/* /home/node/app/packages/evolu-server/node_modules/object-assign/
RUN mkdir /home/node/app/packages/evolu-server/node_modules/bindings/
RUN mv /home/node/app/node_modules/bindings/* /home/node/app/packages/evolu-server/node_modules/bindings/
RUN mkdir /home/node/app/packages/evolu-server/node_modules/prebuild-install/
RUN mv /home/node/app/node_modules/prebuild-install/* /home/node/app/packages/evolu-server/node_modules/prebuild-install/
RUN mkdir /home/node/app/packages/evolu-server/node_modules/file-uri-to-path/
RUN mv /home/node/app/node_modules/file-uri-to-path/* /home/node/app/packages/evolu-server/node_modules/file-uri-to-path/


#EXPRESS LINKING FIX
RUN npm i -g express
Expand Down

0 comments on commit 5e506e7

Please sign in to comment.