I failed deploying my RAILS application - wrong alias

We try to deploy a ruby application but it asks for QOVERY_APPLICATION_Z1D7145EE_HOST_INTERNAL that does not seems to exists on the environment variable part.

What can we do ?

terminated state exit code: 1
2022-05-31T12:11:46Z Warning BackOff: Back-off restarting failed container
2022-05-31T11:40:33Z Warning Unhealthy: Readiness probe failed: dial tcp 10.0.50.98:3000: connect: connection refused
2022-05-31T11:43:12Z Warning BackOff: Back-off restarting failed container
2022-05-31T12:00:14Z Warning BackOff: Back-off restarting failed container
2022-05-31T12:10:18Z Warning Failed: Error: couldn’t find key QOVERY_APPLICATION_Z1D7145EE_HOST_INTERNAL in Secret z801e6dcb-z633b4cef/app-z90ee1637
2022-05-31T12:05:15Z Warning Unhealthy: Readiness probe failed: dial tcp 10.0.58.148:3000: connect: connection refused
2022-05-31T12:08:30Z Warning BackOff: Back-off restarting failed container
2022-05-31T12:06:22Z Warning Unhealthy: Liveness probe failed: dial tcp 10.0.58.148:3000: connect: connection refused
terminated state exit code: 1
2022-05-31T12:11:46Z Warning BackOff: Back-off restarting failed container
2022-05-31T11:40:33Z Warning Unhealthy: Readiness probe failed: dial tcp 10.0.50.98:3000: connect: connection refused
2022-05-31T11:43:12Z Warning BackOff: Back-off restarting failed container
2022-05-31T12:00:14Z Warning BackOff: Back-off restarting failed container
2022-05-31T12:10:18Z Warning Failed: Error: couldn’t find key QOVERY_APPLICATION_Z1D7145EE_HOST_INTERNAL in Secret z801e6dcb-z633b4cef/app-z90ee1637
2022-05-31T12:05:15Z Warning Unhealthy: Readiness probe failed: dial tcp 10.0.58.148:3000: connect: connection refused
2022-05-31T12:08:30Z Warning BackOff: Back-off restarting failed container
2022-05-31T12:06:22Z Warning Unhealthy: Liveness probe failed: dial tcp 10.0.58.148:3000: connect: connection refused

FROM ruby:2.6.9-alpine3.14 
# AS builder

# Minimal requirements to run a Rails app
RUN apk add --no-cache --update build-base \
  alpine-sdk \
  linux-headers \
  git \
  ttf-liberation \
  openjdk8 \
  curl \
  postgresql-dev=~13 \
  # Rails SQL schema format requires `pg_dump(1)` and `psql(1)`
  postgresql=~13 \
  # Install same version of pg_dump
  postgresql-client=~13 \
  nodejs \
  yarn \
  # Needed for nodejs / node-gyp
  python2 \
  tzdata \
  libpq \
  shared-mime-info


ENV BUNDLER_VERSION 1.17.3
ENV BUNDLE_JOBS 8
ENV BUNDLE_RETRY 5
# ENV BUNDLE_WITHOUT development:test
ENV BUNDLE_CACHE_ALL true
ENV RAILS_ENV development
ENV RACK_ENV development
ENV NODE_ENV development
ENV APP_PATH /app

WORKDIR $APP_PATH

# Gems installation
COPY Gemfile ./
COPY --from=jwilder/dockerize /usr/local/bin/dockerize /usr/local/bin/dockerize
ADD bin/pdftk.jar bin/pdftk /usr/bin/

RUN gem install bundler -v $BUNDLER_VERSION
RUN bundle config --global GITHUB__COM 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:x-oauth-basic
RUN bundle install
  # && \
  #rm -rf /usr/local/bundle/cache/*.gem && \
  #find /usr/local/bundle/gems/ -name "*.c" -delete && \
  #find /usr/local/bundle/gems/ -name "*.o" -delete



# NPM packages installation
#COPY package.json yarn.lock ./
#RUN yarn install --frozen-lockfile --non-interactive --production
COPY docker/docker-qovery-entrypoint.sh /app/docker-qovery-entrypoint.sh
RUN chmod a+x /app/docker-qovery-entrypoint.sh

ADD . $APP_PATH

#RUN SECRET_KEY_BASE=`bin/rake secret` rails assets:precompile --trace
#&& \
#  yarn cache clean && \
# rm -rf node_modules tmp/cache vendor/assets test


#FROM ruby:2.6.9-alpine3.14

#RUN mkdir -p /work
#WORKDIR /work

# ENV RAILS_ENV development
# ENV NODE_ENV development
ENV RAILS_SERVE_STATIC_FILES true

# Some native extensions required by gems such as pg or mysql2.
# COPY --from=builder /usr/lib /usr/lib

# Timezone data is required at runtime
# COPY --from=builder /usr/share/zoneinfo/ /usr/share/zoneinfo/

# Ruby gems
#COPY --from=builder /usr/local/bundle /usr/local/bundle
#COPY --from=builder /work /work

ENTRYPOINT ["/app/docker-qovery-entrypoint.sh"]

EXPOSE 3000

CMD ["rails", "server", "-p", "3000", "-b", "0.0.0.0"]

Hi @Philippe_De_Mangou ,

I suspect the issue coming from your app while starting. Can you show me your application logs?


Side note: You can create an alias of a built-in environment variable. Then you’ll not need to change anything on your end.

Here is an example with one of my app:

And then, I can use ENVIRONMENT_NAME in my app instead of the BUILT_IN environment variable.

@rophilogene VoilĂ 

Aucun log de l’app

Voici les logs de déploiements

Did you fix this issue @Philippe_De_Mangou ?

@rophilogene Yes we fix the issue !

Thank you for your support

1 Like