Hybrid method 3: Custom Docker image
Bundle the nodegen-server and Wasm modules into a new Docker image
FROM alpine:latest AS unzipper # Set extract model name ARG MODEL_PATH=./runner_example.zip # Add unzip package RUN apk add unzip RUN mkdir /models && mkdir /model_zip # Copy extracted model model zip to temp folder COPY $MODEL_PATH ./model_zip # Unzip the extracted zip file RUN find ./model_zip -depth -name "*.zip" -exec sh -c 'f="{}"; unzip -- "$f" -d ./models' \; && rm -rf ./model_zip; # Set nodegen-server image FROM ghcr.io/coherent-partners/nodegen-server:latest # Create models folder RUN mkdir /models # Copy unzipped models to previously created folder COPY --from=unzipper /models/ /models # Set MODEL_LOCATION variable to models folder ENV MODEL_LOCATION=/models # Set the hybrid runner mode ENV USE_SAAS=false # Default application will listen on port 3000; you can set different to port by set PORT variable ENV PORT=8080 # Start the application by script npm start CMD ["npm", "start"]docker build -t nodegen_server_custom .docker run --name wasm-server -p 8080:8080 nodegen_server_custom
Configure HTTPS with nginx
HTTPS with nginxLast updated
