-
Notifications
You must be signed in to change notification settings - Fork 73
Expand file tree
/
Copy pathDockerfile
More file actions
69 lines (57 loc) · 1.49 KB
/
Dockerfile
File metadata and controls
69 lines (57 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
FROM ruby:3.3-bullseye
RUN mkdir /opt/actioncenter
WORKDIR /opt/actioncenter
COPY db/global-bundle.pem /opt/actioncenter/vendor/assets/certificates/
RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl \
build-essential \
git \
libpq-dev \
libfontconfig \
postgresql-client \
cron \
gnupg \
libssl-dev \
libffi-dev \
shared-mime-info \
nodejs \
npm
COPY package.json package-lock.json ./
RUN npm install
COPY Gemfile* ./
RUN gem install bundler && bundle install --deployment
COPY bin/ ./bin
COPY config/ ./config
COPY config.ru ./
COPY Rakefile ./
COPY db/ ./db
COPY lib/ ./lib
COPY public/ ./public
COPY app/ ./app
COPY features/ ./features
COPY script/ ./script
COPY spec/ ./spec
COPY vendor/ ./vendor
COPY docker/ ./docker
COPY .rubocop.yml ./.rubocop.yml
COPY .sass-lint.yml ./.sass-lint.yml
RUN usermod -u 1000 www-data
COPY docker/crontab /etc/cron.d/crontab
RUN chmod 0644 /etc/cron.d/crontab
RUN bundle exec rake assets:precompile \
RAILS_ENV=production \
SECRET_KEY_BASE=noop \
devise_secret_key=noop \
amazon_region=noop \
amazon_bucket=noop \
DATABASE_URL=postgres://noop
RUN mkdir /var/www
RUN chown -R www-data /opt/actioncenter/public \
/opt/actioncenter/db \
/opt/actioncenter/tmp \
/opt/actioncenter/log \
/var/www
USER www-data
CMD ["bin/rails", "s", "-b", "0.0.0.0"]
ENTRYPOINT ["/opt/actioncenter/docker/entrypoint.sh"]