Files
docuseal/Dockerfile
T

84 lines
3.1 KiB
Docker
Raw Normal View History

2024-06-21 00:46:11 +03:00
FROM ruby:3.3.1-alpine as fonts
2024-01-07 14:19:21 +02:00
WORKDIR /fonts
2024-06-03 12:01:09 +03:00
RUN apk --no-cache add fontforge wget && wget https://github.com/satbyy/go-noto-universal/releases/download/v7.0/GoNotoKurrent-Regular.ttf && wget https://github.com/satbyy/go-noto-universal/releases/download/v7.0/GoNotoKurrent-Bold.ttf && wget https://github.com/impallari/DancingScript/raw/master/fonts/v2031/DancingScript-Regular.otf && wget https://cdn.jsdelivr.net/gh/notofonts/notofonts.github.io/fonts/NotoSansSymbols2/hinted/ttf/NotoSansSymbols2-Regular.ttf && wget https://github.com/Maxattax97/gnu-freefont/raw/master/ttf/FreeSans.ttf && wget https://github.com/impallari/DancingScript/raw/master/OFL.txt
2024-03-13 14:58:28 +02:00
RUN fontforge -lang=py -c 'font1 = fontforge.open("FreeSans.ttf"); font2 = fontforge.open("NotoSansSymbols2-Regular.ttf"); font1.mergeFonts(font2); font1.generate("FreeSans.ttf")'
2024-01-07 14:19:21 +02:00
2024-06-21 00:46:11 +03:00
FROM ruby:3.3.1-alpine as webpack
2023-06-24 22:50:12 +03:00
ENV RAILS_ENV=production
ENV NODE_ENV=production
WORKDIR /app
RUN apk add --no-cache nodejs yarn git build-base && \
gem install shakapacker
COPY ./package.json ./yarn.lock ./
RUN yarn install --network-timeout 1000000
COPY ./bin/shakapacker ./bin/shakapacker
COPY ./config/webpack ./config/webpack
COPY ./config/shakapacker.yml ./config/shakapacker.yml
2024-04-11 21:31:22 +03:00
COPY ./postcss.config.js ./postcss.config.js
COPY ./tailwind.config.js ./tailwind.config.js
COPY ./tailwind.form.config.js ./tailwind.form.config.js
COPY ./tailwind.application.config.js ./tailwind.application.config.js
2023-06-24 22:50:12 +03:00
COPY ./app/javascript ./app/javascript
COPY ./app/views ./app/views
RUN echo "gem 'shakapacker'" > Gemfile && ./bin/shakapacker
2024-06-21 00:46:11 +03:00
FROM ruby:3.3.1-alpine as app
2023-06-24 22:50:12 +03:00
ENV RAILS_ENV=production
ENV BUNDLE_WITHOUT="development:test"
2024-05-02 10:01:31 +03:00
ENV LD_PRELOAD=/lib/libgcompat.so.0
2024-05-10 22:55:21 +03:00
ENV OPENSSL_CONF=/app/openssl_legacy.cnf
2023-06-24 22:50:12 +03:00
WORKDIR /app
2024-06-18 16:51:42 +03:00
RUN apk add --no-cache sqlite-dev libpq-dev mariadb-dev vips-dev vips-poppler poppler-utils redis vips-heif gcompat ttf-freefont && mkdir /fonts && rm /usr/share/fonts/freefont/FreeSans.otf
2023-06-24 22:50:12 +03:00
2024-05-10 22:55:21 +03:00
RUN echo $'.include = /etc/ssl/openssl.cnf\n\
\n\
[provider_sect]\n\
default = default_sect\n\
legacy = legacy_sect\n\
\n\
[default_sect]\n\
activate = 1\n\
\n\
[legacy_sect]\n\
activate = 1' >> /app/openssl_legacy.cnf
2023-06-24 22:50:12 +03:00
COPY ./Gemfile ./Gemfile.lock ./
2024-05-02 10:01:31 +03:00
RUN apk add --no-cache build-base && bundle install && apk del build-base && rm -rf ~/.bundle /usr/local/bundle/cache && ruby -e "puts Dir['/usr/local/bundle/**/{spec,rdoc,resources/shared,resources/collation,resources/locales}']" | xargs rm -rf
2023-06-24 22:50:12 +03:00
2023-08-12 12:33:07 +03:00
COPY ./bin ./bin
COPY ./app ./app
COPY ./config ./config
COPY ./db ./db
COPY ./log ./log
COPY ./lib ./lib
COPY ./public ./public
COPY ./tmp ./tmp
2024-01-06 22:58:26 +02:00
COPY LICENSE README.md Rakefile config.ru .version ./
2023-06-24 22:50:12 +03:00
2024-02-16 11:34:30 +02:00
COPY --from=fonts /fonts/GoNotoKurrent-Regular.ttf /fonts/GoNotoKurrent-Bold.ttf /fonts/DancingScript-Regular.otf /fonts/OFL.txt /fonts
2024-03-13 14:58:28 +02:00
COPY --from=fonts /fonts/FreeSans.ttf /usr/share/fonts/freefont
2023-06-24 22:50:12 +03:00
COPY --from=webpack /app/public/packs ./public/packs
2023-10-28 16:03:19 +03:00
RUN ln -s /fonts /app/public/fonts
2023-06-24 22:50:12 +03:00
RUN bundle exec bootsnap precompile --gemfile app/ lib/
WORKDIR /data/docuseal
ENV WORKDIR=/data/docuseal
EXPOSE 3000
2024-03-26 01:17:53 +02:00
CMD ["/app/bin/bundle", "exec", "puma", "-C", "/app/config/puma.rb", "--dir", "/app"]