diff --git a/Dockerfile b/Dockerfile index 7e80c0e3..a222596d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Use the official Node.js image as the base image -FROM node:16.20.2 +FROM node:22-slim # Set the working directory in the Docker container WORKDIR /usr/src/app @@ -7,6 +7,9 @@ WORKDIR /usr/src/app # Copy the package.json and package-lock.json files to the container COPY package.json package-lock.json ./ +# Copy the packages in this monorepo to the container +COPY ./packages ./packages + # Install the required npm packages in the container RUN npm install @@ -17,4 +20,4 @@ COPY demo ./demo EXPOSE 8080 # Start the Koop server -CMD ["node", "demo/index.js"] \ No newline at end of file +CMD ["npm", "run", "demo"] diff --git a/README.md b/README.md index 8920e5a8..171f1197 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,10 @@ Koop's plugin-architecture facilates custom deployments specific to your needs. ![lots of geojson into feature services](https://user-images.githubusercontent.com/7832202/28444721-43eb6ea6-6d8d-11e7-8d56-3af46fd5bf88.png) ## Demo -Want to see Koop in action? The repository ships with a demo that shows Koops support for GeoServices (ArcGIS). It leverages the file-geojson data provider and the GeoServices output-plugin: + +Want to see Koop in action? The repository ships with a demo that shows Koop's support for GeoServices (ArcGIS). It leverages the `file-geojson` data provider and the GeoServices output plugin. + +You can run the demo with npm: ```bash git clone https://github.com/koopjs/koop @@ -17,6 +20,14 @@ cd koop npm run demo ``` +Or if you'd prefer to run the demo in a Docker container: + +```bash +cd koop +docker build -t koop . +docker run -p 8080:8080 --rm koop +``` + Koop will start listening on port 8080. You should the following console logging noting the exposed file-geojson/GeoService routes: ```bash