-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.3.0-beta.22
perseus deploy
Found argument 'standalone' which wasn't expected, or isn't valid in this context
#92
Comments
I'm pretty sure this is actually caused by the addition of the ability to switch to a different server integration, which is impacting the way standalone builds work. This should be a very easy fix, thanks for letting me know (this is what happens when |
This is fixed in beta 23, it was caused by my forgetting to put in a |
Thank you, @arctic-hen7.
Dockerfile # get the base image
FROM rust:1.57-slim AS build
# install build dependencies
RUN apt update \
&& apt install -y --no-install-recommends lsb-release apt-transport-https \
build-essential curl
# vars
ENV PERSEUS_VERSION=0.3.0-beta.23 \
PERSEUS_SIZE_OPT_VERSION=0.1.5 \
ESBUILD_VERSION=0.14.4
# prepare root project dir
WORKDIR /app
# download the target for wasm
RUN rustup target add wasm32-unknown-unknown
# install wasm-pack
RUN cargo install wasm-pack
# retrieve the src dir
RUN curl https://codeload.github.com/arctic-hen7/perseus-size-opt/tar.gz/main | tar -xz --strip=2 perseus-size-opt-main/examples/simple
# go to src dir
WORKDIR /app/simple
# install perseus-cli
RUN cargo install perseus-cli --version $PERSEUS_VERSION
# clean and prep app
RUN perseus clean && perseus prep
# specify deps in app config
RUN sed -i s"/perseus = .*/perseus = \"${PERSEUS_VERSION}\"/" ./Cargo.toml \
&& sed -i s"/perseus-size-opt = .*/perseus-size-opt = \"${PERSEUS_SIZE_OPT_VERSION}\"/" ./Cargo.toml \
&& cat ./Cargo.toml
# modify lib.rs
RUN sed -i s'/SizeOpts::default()/SizeOpts { wee_alloc: true, lto: false, opt_level: "s".to_string(), codegen_units: 1, enable_fluent_bundle_patch: false, }/' ./src/lib.rs \
&& cat ./src/lib.rs
# run plugin(s) to adjust app
RUN perseus tinker \
&& cat .perseus/Cargo.toml \
&& cat ./src/lib.rs
# single-threaded perseus CLI mode
#ENV PERSEUS_CLI_SEQUENTIAL=true
# deploy app
RUN perseus deploy
# go back to app dir
WORKDIR /app
# download and unpack esbuild
RUN curl -O https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-${ESBUILD_VERSION}.tgz \
&& tar xf esbuild-linux-64-${ESBUILD_VERSION}.tgz \
&& ./package/bin/esbuild --version
# run esbuild against bundle.js
RUN ./package/bin/esbuild ./simple/pkg/dist/pkg/perseus_engine.js --minify --target=es6 --outfile=./simple/pkg/dist/pkg/perseus_engine.js --allow-overwrite \
&& ls -lha ./simple/pkg/dist/pkg
# prepare deployment image
FROM bitnami/minideb:buster
WORKDIR /app
COPY --from=build /app/simple/pkg /app/
ENV HOST=0.0.0.0
CMD ["./server"] |
Describe the bug
This time the docker image build error is not VPS related. The error is reproducable locally. It's most likely related to the removal of
PERSEUS_STANDALONE
env var in the d178f5a commit. Removal of optimizations doesn't fix the issue.To Reproduce
Dockerfile
Last steps of docker build output
Expected behavior
Build the docker image as expected.
Environment:
Additional context
The
Dockerfile
is standalone. Note that here the standalone keyword shouldn't be confused with the standalone term used to describe the issue.The text was updated successfully, but these errors were encountered: