-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
53 lines (47 loc) · 1.5 KB
/
Dockerfile
File metadata and controls
53 lines (47 loc) · 1.5 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
FROM ruby:3.3.4-alpine AS dev
RUN apk add --no-cache \
make \
pkgconfig \
build-base \
autoconf \
nodejs \
yarn \
mariadb-dev \
bash # used in crontab generated by whenever
RUN mkdir /application
WORKDIR /application
COPY Gemfile /application/Gemfile
COPY Gemfile.lock /application/Gemfile.lock
RUN bundle install
# Add a script to be executed every time the container starts.
COPY docker-entrypoint.sh /usr/bin/
RUN chmod +x /usr/bin/docker-entrypoint.sh
ENTRYPOINT ["sh", "docker-entrypoint.sh"]
EXPOSE 3000
# Start the main process.
CMD ["rails", "server", "-b", "0.0.0.0"]
FROM dev AS prod
COPY package.json yarn.lock /application/
RUN yarn install --frozen-lockfile
COPY . /application
RUN RAILS_ENV=production \
NODE_OPTIONS=--openssl-legacy-provider \
SECRET_KEY_BASE=placeholder \
WJR_DATABASE_NAME=placeholder \
WJR_DATABASE_TEST_NAME=placeholder \
WJR_DATABASE_HOST=placeholder \
WJR_DATABASE_USERNAME=placeholder \
WJR_DATABASE_PASSWORD=placeholder \
WJR_PASSWORD_SALT=placeholder \
WJR_SECRET_BASE=placeholder \
WJR_SECRET_TOKEN=placeholder \
WJR_DEVISE_SECRET_KEY=placeholder \
WJR_RECAPTCHA_SITE_KEY=placeholder \
WJR_RECAPTCHA_SECRET_KEY=placeholder \
WJR_SMTP_ADDRESS=placeholder \
WJR_SMTP_DOMAIN=placeholder \
WJR_SMTP_USER_NAME=placeholder \
WJR_SMTP_PASSWORD=placeholder \
WJR_DATA_FOLDER=placeholder \
WJR_DATA_URL=placeholder \
bundle exec rails assets:precompile