diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..1ed31c713 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,11 @@ +.bundle +.env +.env.* +public/system +public/assets +public/packs +node_modules +vendor/bundle +.DS_Store +*.swp +*~ diff --git a/docker-compose.yaml b/docker-compose.yaml index 094f20a08..446508e25 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -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: diff --git a/docker/Dockerfile b/docker/Dockerfile index 69da9c48d..b99daf952 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -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/