forked from automaticmode/active_workflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
22 lines (14 loc) · 766 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM ruby:2.6.3-slim
COPY docker/scripts/prepare /scripts/
RUN /scripts/prepare
WORKDIR /app
COPY ./ /app/
# Get rid of annoying "fatal: Not a git repository (or any of the parent directories): .git" messages
RUN umask 002 && git init && \
LC_ALL=en_US.UTF-8 RAILS_ENV=production SECRET_KEY_BASE=secret DATABASE_ADAPTER=postgresql bundle install --without "test development" --path vendor/bundle -j 4 --no-local --no-cache --force && \
LC_ALL=en_US.UTF-8 RAILS_ENV=production SECRET_KEY_BASE=secret DATABASE_ADAPTER=postgresql bundle exec rake assets:clean assets:precompile && \
chmod g=u /app/Gemfile.lock /app/config/ /app/tmp/
EXPOSE 3000
COPY ["docker/scripts/setup_env", "docker/scripts/init", "/scripts/"]
CMD ["/scripts/init"]
USER 1001