Better Docker config: Use entrypoint to setup the environment, run in production mode by default, defaults for all config values

This commit is contained in:
Jyri-Petteri Paloposki 2020-07-19 16:12:57 +03:00
parent 67012821e6
commit 3f22c8a036
6 changed files with 42 additions and 59 deletions

View file

@ -17,9 +17,11 @@ COPY . /app/
COPY config/database.docker.yml /app/config/database.yml
COPY config/site.docker.yml /app/config/site.yml
COPY docker-startserver.sh /
RUN RAILS_ENV=production bundle exec rake assets:precompile
COPY docker-entrypoint.sh /
ENTRYPOINT ["./docker-entrypoint.sh"]
EXPOSE 3000
#CMD ["rails", "server", "-e", "production", "-b", "0.0.0.0"]
CMD ["./docker-startserver.sh"]
CMD ["rails", "server", "-b", "0.0.0.0"]