-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-prod
56 lines (44 loc) · 1.27 KB
/
Dockerfile-prod
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
# Dockerfile
# Use ruby image to build our own image
# TODO: change based when we change version of ruby
FROM --platform=linux/x86_64 ruby:3.1.4-alpine3.19 as base
# Ensure that we work in UTF 8
ENV LANG C.UTF-8 # ensure that the encoding is UTF8
ENV LANGUAGE C.UTF-8 # ensure that the encoding is UTF8
ARG RAILS_ENV=production
ARG NODE_ENV=production
# Use a persistent volume for the gems installed by the bundler
ENV BUNDLE_PATH /var/bundler
ARG DEVISE_SECRET
RUN apk add \
build-base \
freetds-dev \
git \
less \
netcat-openbsd \
postgresql-client \
postgresql-dev \
pkgconfig \
openssl \
shared-mime-info \
tzdata \
yarn \
&& rm -rf /var/cache/apk/*
# Install bundler for this Docker image
RUN gem install bundler:2.3.26
# WORKDIR /setup
ADD . /opt/culture
WORKDIR /opt/culture
# Just not use dev here
# TODO: we need to check this
RUN bin/bundle install --without development
RUN bin/vite install
# RUN bin/vite install
# The pre-compile will be done as part of the deploy of the image
# The precompile will also deal with the webpacker assets
# RUN bin/rake assets:precompile --trace
# bin/vite build --clear
# We expose the port
EXPOSE 3000
# CMD script/culture_start.sh
CMD ["tail", "-f", "/dev/null"]