forked from performant-software/iiif-cloud
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
34 lines (32 loc) · 832 Bytes
/
Dockerfile
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
FROM ruby:3.1.1
RUN apt update && apt install git npm nodejs curl ruby-foreman -y
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash -
RUN apt update -y
RUN apt upgrade -y
RUN apt install nodejs -y
RUN node -v
RUN npm install -g yarn
RUN mkdir /app
WORKDIR /app
RUN gem install bundler
ADD Gemfile /app/Gemfile
ADD Gemfile.lock /app/Gemfile.lock
RUN bundle update rake
RUN bundle install
RUN mkdir /app/client
WORKDIR /app/client
ADD client/package.json /app/client/
ADD client/yarn.lock /app/client
RUN yarn
WORKDIR /app
ADD . /app
RUN chmod +x docker-run.sh
ENV RAILS_ENV=production
ENV DISABLE_ESLINT_PLUGIN=true
WORKDIR /app/client
ENV ESLINT_NO_DEV_ERRORS=true
RUN ESLINT_NO_DEV_ERRORS=true yarn run build
WORKDIR /app
RUN mkdir "public"
RUN cp -Rf /app/client/build/* /app/public/
CMD ["sh", "-c", "./docker-run.sh"]