Fix docker file to use rails_env=production on precompile (#315)
* Fix docker file to use rails_env=production on precompile * Fix docker file for prod deployment
This commit is contained in:
parent
dab21915b4
commit
8ea74a21b0
3 changed files with 16 additions and 2 deletions
11
.dockerignore
Normal file
11
.dockerignore
Normal file
|
@ -0,0 +1,11 @@
|
|||
.bundle
|
||||
.env
|
||||
.env.*
|
||||
public/system
|
||||
public/assets
|
||||
public/packs
|
||||
node_modules
|
||||
vendor/bundle
|
||||
.DS_Store
|
||||
*.swp
|
||||
*~
|
|
@ -15,6 +15,7 @@ services:
|
|||
environment:
|
||||
- REDIS_URL=redis://redis:6379
|
||||
- POSTGRES_HOST=postgres
|
||||
- RAILS_ENV=development
|
||||
command: ["foreman", "start", "-f", "./docker/Procfile.docker.dev"]
|
||||
|
||||
postgres:
|
||||
|
|
|
@ -20,9 +20,11 @@ RUN mkdir -p /app
|
|||
WORKDIR /app
|
||||
COPY . /app
|
||||
|
||||
ENV RAILS_SERVE_STATIC_FILES true
|
||||
ENV RAILS_ENV=production
|
||||
|
||||
RUN bundle
|
||||
RUN yarn
|
||||
RUN bundle exec rake assets:precompile
|
||||
RUN SECRET_KEY_BASE=precompile_placeholder bundle exec rake assets:precompile
|
||||
|
||||
# Add a script to be executed every time the container starts.
|
||||
COPY ./docker/entrypoint.sh /usr/bin/
|
||||
|
|
Loading…
Reference in a new issue