Ryan Scott
07/05/2024, 7:16 PMDavid Herman
07/05/2024, 7:17 PMRyan Scott
07/05/2024, 7:17 PMRyan Scott
07/05/2024, 7:18 PM@Page("/people/{personId}")
@Composable
fun PersonPage() {
David Herman
07/05/2024, 7:18 PMRyan Scott
07/05/2024, 7:18 PMRyan Scott
07/05/2024, 7:19 PMDavid Herman
07/05/2024, 7:19 PMRyan Scott
07/05/2024, 7:19 PMDavid Herman
07/05/2024, 7:20 PMRyan Scott
07/05/2024, 7:20 PMFROM azul/zulu-openjdk:17.0.11-jdk
# In order to use this, the site must be pre-built
RUN mkdir /app
WORKDIR /app
# curl is used to download the cobweb-cli tarball.
RUN apt-get update && apt-get install -y curl
# the URL is actually a redirect; -L enables curl to follow the redirect and download the actual file
RUN curl -L -s -O <https://github.com/varabyte/kobweb-cli/releases/download/v0.9.15/kobweb-0.9.15.tar>
RUN tar -xf kobweb-0.9.15.tar && rm kobweb-0.9.15.tar
ENV PATH /app/kobweb-0.9.15/bin:$PATH
# Copy the necessary files below to use gradle to build the site
COPY . .
# exports the site and exposes the port based upon the site's configuration
RUN export PORT=$(kobweb conf --path site server.port)
EXPOSE $PORT
# Removes the packages we installed (with their dependencies because they are no longer needed
RUN apt-get purge --auto-remove -y curl && rm -rf /var/lib/apt/lists/*
# Starts up the site in production mode
CMD kobweb run --path site --notty --env prod --foreground --layout static
David Herman
07/05/2024, 7:21 PMfullstack
layout in your caseDavid Herman
07/05/2024, 7:21 PMRyan Scott
07/05/2024, 7:22 PMRyan Scott
07/05/2024, 7:22 PMDavid Herman
07/05/2024, 7:22 PMRyan Scott
07/05/2024, 7:22 PMDavid Herman
07/05/2024, 7:23 PMRyan Scott
07/05/2024, 7:23 PMDavid Herman
07/05/2024, 7:24 PMDavid Herman
07/05/2024, 7:25 PMRyan Scott
07/05/2024, 7:53 PMRyan Scott
07/05/2024, 7:53 PM