Redocly / developer-portal-starter

Starter template for the Redocly developer portal
https://redoc.ly
Other
64 stars 101 forks source link

creating running via dockerfile #250

Closed thecloudgeek closed 1 year ago

thecloudgeek commented 1 year ago

I'm trying to run this using a Dockerfile as such:

FROM node

# Define arguments and environment variables
ARG ARTIFACTORY_USERNAME
ARG ARTIFACTORY_PASSWORD
ENV ARTIFACTORY_USERNAME=$ARTIFACTORY_USERNAME
ENV ARTIFACTORY_PASSWORD=$ARTIFACTORY_PASSWORD

# # Add curl and bash for debugging
RUN apt-get update -y && apt-get install -y curl bash

# # Install npm-cli-login
RUN npm install -g npm-cli-login

WORKDIR /usr/src/app

# # Log in to Artifactory
RUN \
    npm-cli-login \
    -u $ARTIFACTORY_USERNAME \
    -p $ARTIFACTORY_PASSWORD \
    -e $ARTIFACTORY_USERNAME@abc.com \
    -r https://artifactory.abc.cc/artifactory/api/npm/npm

# # Copy package files and install dependencies
COPY --chown=node package*.json /usr/src/app/
RUN npm install --legacy-peer-deps

# # Copy application files
COPY --chown=node . /usr/src/app/

CMD ["npm start"]

# Expose the Nginx port
EXPOSE 3000

the problem is that this binds to localhost vs 0.0.0.0. How can I bind this to 0.0.0.0 so that I can use it inside of docker? I've also tried to edit package.json to redocly-portal develop -p 3000 -h 0.0.0.0 as well but it still starts on localhost.

lornajane commented 1 year ago

The developer portal library is intended (and licensed) only for local development, so it's not packaged for deployment and we don't have plans to improve the docker support. Hopefully you can use the tool locally, and please let us know if you need anything else.