You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have open_api_spex working in development.
My application is an API only phoenix application
In production I am using mix release and docker. The dockerfile is given below:
# ---- Build Stage ----FROM erlang:22-alpineASapp_builder# Set environment variables for building the applicationENV MIX_ENV=prod \
TEST=1 \
LANG=C.UTF-8# Fetch the latest version of Elixir (once the 1.9 docker image is available you won't have to do this)RUN set -xe \
&&apkaddcurlmakegccbuild-base--update-cache \
&&ELIXIR_DOWNLOAD_URL="https://github.com/elixir-lang/elixir/archive/v1.10.4.tar.gz" \
&&ELIXIR_DOWNLOAD_SHA256="8518c78f43fe36315dbe0d623823c2c1b7a025c114f3f4adbb48e04ef63f1d9f" \
&&curl-fSL-oelixir-src.tar.gz $ELIXIR_DOWNLOAD_URL \
&&echo"$ELIXIR_DOWNLOAD_SHA256 elixir-src.tar.gz"|sha256sum-c- \
&&mkdir-p/usr/local/src/elixir \
&&tar-xzC/usr/local/src/elixir--strip-components=1-felixir-src.tar.gz \
&&rmelixir-src.tar.gz \
&&cd/usr/local/src/elixir \
&&makeinstallclean# Install hex and rebarRUN mix local.hex--force&& \
mixlocal.rebar--force# Create the application build directoryRUN mkdir /appWORKDIR/app# Copy over all the necessary application files and directoriesCOPY config ./configCOPY lib ./libCOPY priv ./privCOPY rel ./relCOPY mix.exs.COPY mix.lock.# Fetch the application dependencies and build the applicationRUN mix deps.getRUN mix deps.compileRUN mix phx.digestRUN mix release# ---- Application Stage ----FROM alpine AS appENV LANG=C.UTF-8# Install opensslRUN apk update&&apkaddopensslncurses-libspostgresql-client&& \
rm-rf/var/cache/apk/*# Copy over the build artifact from the previous step and create a non root userRUNadduser-h/home/app-DappWORKDIR/home/appCOPY--from=app_builder/app/_build.RUN chown -Rapp: ./prodUSERappCOPY entrypoint.sh.# Run the Phoenix appCMD["./entrypoint.sh"
When trying to access any of the endpoints after building and deploying the docker image I am getting the following error which I don't understand:
I have open_api_spex working in development.
My application is an API only phoenix application
In production I am using mix release and docker. The dockerfile is given below:
When trying to access any of the endpoints after building and deploying the docker image I am getting the following error which I don't understand:
I am not sure what to do with this error. Would appreciate any help
The text was updated successfully, but these errors were encountered: