mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-25 02:09:05 +01:00
update docker file
This commit is contained in:
parent
68184e4005
commit
3ed01e2d55
2042
.pnp.loader.mjs
generated
2042
.pnp.loader.mjs
generated
File diff suppressed because it is too large
Load Diff
16
Dockerfile
16
Dockerfile
@ -3,7 +3,7 @@ FROM alpine:3.18 as build
|
|||||||
WORKDIR /iceshrimp
|
WORKDIR /iceshrimp
|
||||||
|
|
||||||
# Install compilation dependencies
|
# Install compilation dependencies
|
||||||
RUN apk add --no-cache --no-progress git alpine-sdk vips-dev python3 nodejs-current npm rust cargo vips
|
RUN apk add --no-cache --no-progress git alpine-sdk vips-dev python3 nodejs-current rust cargo vips
|
||||||
|
|
||||||
# Copy only the cargo dependency-related files first, to cache efficiently
|
# Copy only the cargo dependency-related files first, to cache efficiently
|
||||||
COPY packages/backend/native-utils/Cargo.toml packages/backend/native-utils/Cargo.toml
|
COPY packages/backend/native-utils/Cargo.toml packages/backend/native-utils/Cargo.toml
|
||||||
@ -26,21 +26,21 @@ COPY packages/backend/native-utils/package.json packages/backend/native-utils/pa
|
|||||||
COPY packages/backend/native-utils/npm/linux-x64-musl/package.json packages/backend/native-utils/npm/linux-x64-musl/package.json
|
COPY packages/backend/native-utils/npm/linux-x64-musl/package.json packages/backend/native-utils/npm/linux-x64-musl/package.json
|
||||||
COPY packages/backend/native-utils/npm/linux-arm64-musl/package.json packages/backend/native-utils/npm/linux-arm64-musl/package.json
|
COPY packages/backend/native-utils/npm/linux-arm64-musl/package.json packages/backend/native-utils/npm/linux-arm64-musl/package.json
|
||||||
|
|
||||||
# Configure corepack and pnpm, and install dev mode dependencies for compilation
|
# Configure corepack and yarn, and install dev mode dependencies for compilation
|
||||||
RUN corepack enable && corepack prepare pnpm@latest --activate && pnpm i
|
RUN corepack enable && corepack prepare yarn@latest --activate && yarn
|
||||||
|
|
||||||
# Copy in the rest of the native-utils rust files
|
# Copy in the rest of the native-utils rust files
|
||||||
COPY packages/backend/native-utils packages/backend/native-utils/
|
COPY packages/backend/native-utils packages/backend/native-utils/
|
||||||
|
|
||||||
# Compile native-utils
|
# Compile native-utils
|
||||||
RUN pnpm run --filter native-utils build
|
RUN yarn workspace native-utils build
|
||||||
|
|
||||||
# Copy in the rest of the files to compile
|
# Copy in the rest of the files to compile
|
||||||
COPY . ./
|
COPY . ./
|
||||||
RUN env NODE_ENV=production sh -c "pnpm run --filter '!native-utils' build && pnpm run gulp"
|
RUN env NODE_ENV=production sh -c "yarn workspaces foreach --exclude native-utils build && yarn gulp"
|
||||||
|
|
||||||
# Trim down the dependencies to only those for production
|
# Trim down the dependencies to only those for production
|
||||||
RUN pnpm i --prod
|
RUN yarn workspaces focus --all --production
|
||||||
|
|
||||||
## Runtime container
|
## Runtime container
|
||||||
FROM alpine:3.18
|
FROM alpine:3.18
|
||||||
@ -66,8 +66,8 @@ COPY --from=build /iceshrimp/packages/backend/built /iceshrimp/packages/backend/
|
|||||||
COPY --from=build /iceshrimp/packages/backend/assets/instance.css /iceshrimp/packages/backend/assets/instance.css
|
COPY --from=build /iceshrimp/packages/backend/assets/instance.css /iceshrimp/packages/backend/assets/instance.css
|
||||||
COPY --from=build /iceshrimp/packages/backend/native-utils/built /iceshrimp/packages/backend/native-utils/built
|
COPY --from=build /iceshrimp/packages/backend/native-utils/built /iceshrimp/packages/backend/native-utils/built
|
||||||
|
|
||||||
RUN corepack enable && corepack prepare pnpm@latest --activate
|
RUN corepack enable && corepack prepare yarn@latest --activate
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
VOLUME "/iceshrimp/files"
|
VOLUME "/iceshrimp/files"
|
||||||
ENTRYPOINT [ "/sbin/tini", "--" ]
|
ENTRYPOINT [ "/sbin/tini", "--" ]
|
||||||
CMD [ "pnpm", "run", "migrateandstart" ]
|
CMD [ "yarn", "run", "migrateandstart" ]
|
||||||
|
16
yarn.lock
16
yarn.lock
@ -22181,41 +22181,41 @@ __metadata:
|
|||||||
|
|
||||||
"typescript@patch:typescript@4.9.4#~builtin<compat/typescript>":
|
"typescript@patch:typescript@4.9.4#~builtin<compat/typescript>":
|
||||||
version: 4.9.4
|
version: 4.9.4
|
||||||
resolution: "typescript@patch:typescript@npm%3A4.9.4#~builtin<compat/typescript>::version=4.9.4&hash=23ec76"
|
resolution: "typescript@patch:typescript@npm%3A4.9.4#~builtin<compat/typescript>::version=4.9.4&hash=289587"
|
||||||
bin:
|
bin:
|
||||||
tsc: bin/tsc
|
tsc: bin/tsc
|
||||||
tsserver: bin/tsserver
|
tsserver: bin/tsserver
|
||||||
checksum: 3e2ab0772908676d9b9cb83398c70003a3b08e1c6b3b122409df9f4b520f2fdaefa20c3d7d57dce283fed760ac94b3ce94d4a7fa875127b67852904425a1f0dc
|
checksum: 2160f7ad975c59b2f5816817d3916be1d156c5688a7517602b3b640c5015e740f4ba933996ac85371d68f7bbdd41602150fb8b68334122ac637fdb5418085e7a
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"typescript@patch:typescript@5.1.3#~builtin<compat/typescript>":
|
"typescript@patch:typescript@5.1.3#~builtin<compat/typescript>":
|
||||||
version: 5.1.3
|
version: 5.1.3
|
||||||
resolution: "typescript@patch:typescript@npm%3A5.1.3#~builtin<compat/typescript>::version=5.1.3&hash=1f5320"
|
resolution: "typescript@patch:typescript@npm%3A5.1.3#~builtin<compat/typescript>::version=5.1.3&hash=5da071"
|
||||||
bin:
|
bin:
|
||||||
tsc: bin/tsc
|
tsc: bin/tsc
|
||||||
tsserver: bin/tsserver
|
tsserver: bin/tsserver
|
||||||
checksum: 32a25b2e128a4616f999d4ee502aabb1525d5647bc8955e6edf05d7fbc53af8aa98252e2f6ba80bcedfc0260c982b885f3c09cfac8bb65d2924f3133ad1e1e62
|
checksum: 6f0a9dca6bf4ce9dcaf4e282aade55ef4c56ecb5fb98d0a4a5c0113398815aea66d871b5611e83353e5953a19ed9ef103cf5a76ac0f276d550d1e7cd5344f61e
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"typescript@patch:typescript@5.1.6#~builtin<compat/typescript>":
|
"typescript@patch:typescript@5.1.6#~builtin<compat/typescript>":
|
||||||
version: 5.1.6
|
version: 5.1.6
|
||||||
resolution: "typescript@patch:typescript@npm%3A5.1.6#~builtin<compat/typescript>::version=5.1.6&hash=1f5320"
|
resolution: "typescript@patch:typescript@npm%3A5.1.6#~builtin<compat/typescript>::version=5.1.6&hash=5da071"
|
||||||
bin:
|
bin:
|
||||||
tsc: bin/tsc
|
tsc: bin/tsc
|
||||||
tsserver: bin/tsserver
|
tsserver: bin/tsserver
|
||||||
checksum: 21e88b0a0c0226f9cb9fd25b9626fb05b4c0f3fddac521844a13e1f30beb8f14e90bd409a9ac43c812c5946d714d6e0dee12d5d02dfc1c562c5aacfa1f49b606
|
checksum: f53bfe97f7c8b2b6d23cf572750d4e7d1e0c5fff1c36d859d0ec84556a827b8785077bc27676bf7e71fae538e517c3ecc0f37e7f593be913d884805d931bc8be
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"typescript@patch:typescript@~5.0.4#~builtin<compat/typescript>":
|
"typescript@patch:typescript@~5.0.4#~builtin<compat/typescript>":
|
||||||
version: 5.0.4
|
version: 5.0.4
|
||||||
resolution: "typescript@patch:typescript@npm%3A5.0.4#~builtin<compat/typescript>::version=5.0.4&hash=1f5320"
|
resolution: "typescript@patch:typescript@npm%3A5.0.4#~builtin<compat/typescript>::version=5.0.4&hash=b5f058"
|
||||||
bin:
|
bin:
|
||||||
tsc: bin/tsc
|
tsc: bin/tsc
|
||||||
tsserver: bin/tsserver
|
tsserver: bin/tsserver
|
||||||
checksum: 6a1fe9a77bb9c5176ead919cc4a1499ee63e46b4e05bf667079f11bf3a8f7887f135aa72460a4c3b016e6e6bb65a822cb8689a6d86cbfe92d22cc9f501f09213
|
checksum: d26b6ba97b6d163c55dbdffd9bbb4c211667ebebc743accfeb2c8c0154aace7afd097b51165a72a5bad2cf65a4612259344ff60f8e642362aa1695c760d303ac
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user