mirror of
https://github.com/internetee/registry.git
synced 2025-07-28 05:26:17 +02:00
- Refactor CompanyRegisterStatusJob for better readability and error handling - Update whitelisted_companies to use JSON parsing with fallback - Fix company register status check in tests with proper mock data - Remove debug logging statements - Add null check for domain status notes - Update test dependencies (Capybara and Selenium) for better stability
102 lines
No EOL
3.2 KiB
Docker
102 lines
No EOL
3.2 KiB
Docker
FROM --platform=linux/amd64 ruby:3.0.3-slim-buster
|
||
|
||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||
RUN apt-get update > /dev/null && apt-get install -y --no-install-recommends > /dev/null \
|
||
build-essential=* \
|
||
imagemagick=* \
|
||
curl \
|
||
wget \
|
||
gnupg2 \
|
||
git \
|
||
apt-utils \
|
||
&& apt-get dist-upgrade -yf\
|
||
&& apt-get clean \
|
||
&& rm -rf /var/lib/apt/lists/*
|
||
|
||
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y locales
|
||
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen
|
||
RUN sed -i -e 's/# et_EE.UTF-8 UTF-8/et_EE.UTF-8 UTF-8/' /etc/locale.gen && \
|
||
dpkg-reconfigure --frontend=noninteractive locales && \
|
||
update-locale LANG=et_EE.UTF-8
|
||
|
||
ENV LANG et_EE.UTF-8
|
||
RUN curl https://www.postgresql.org/media/keys/ACCC4CF8.asc -s | apt-key add -
|
||
RUN sh -c 'echo "deb https://apt-archive.postgresql.org/pub/repos/apt bionic-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
|
||
RUN apt-get update > /dev/null && apt-get install -y --no-install-recommends > /dev/null \
|
||
postgresql-client-13=* \
|
||
libpq-dev \
|
||
&& apt-get clean \
|
||
&& rm -rf /var/lib/apt/lists/*
|
||
|
||
# add repository for Node.js in the LTS version
|
||
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
|
||
|
||
RUN apt-get install -y --no-install-recommends > /dev/null \
|
||
nodejs=* \
|
||
qt5-default=* \
|
||
libqt5webkit5-dev=* \
|
||
gstreamer1.0-plugins-base=* \
|
||
libappindicator3-1=* \
|
||
gstreamer1.0-tools=* \
|
||
qtdeclarative5-dev=* \
|
||
fonts-liberation=* \
|
||
gstreamer1.0-x=* \
|
||
libasound2=* \
|
||
libnspr4=* \
|
||
libnss3=* \
|
||
libxss1=* \
|
||
libxtst6=* \
|
||
xdg-utils=* \
|
||
qtdeclarative5-dev=* \
|
||
fonts-liberation=* \
|
||
gstreamer1.0-x=* \
|
||
wkhtmltopdf \
|
||
libxslt1-dev \
|
||
libxml2-dev \
|
||
python-dev \
|
||
unzip \
|
||
# libc6-i386 \
|
||
# lib32gcc-s1 \
|
||
wkhtmltopdf \
|
||
xvfb \
|
||
&& apt-get clean \
|
||
&& rm -rf /var/lib/apt/lists/*
|
||
|
||
RUN apt-get autoremove -y && apt-get clean
|
||
|
||
ENV CHROME_VERSION="128.0.6613.137"
|
||
|
||
RUN wget -q "https://storage.googleapis.com/chrome-for-testing-public/${CHROME_VERSION}/linux64/chrome-linux64.zip" \
|
||
&& unzip chrome-linux64.zip -d /opt/ \
|
||
&& rm chrome-linux64.zip
|
||
|
||
RUN wget -q "https://storage.googleapis.com/chrome-for-testing-public/${CHROME_VERSION}/linux64/chromedriver-linux64.zip" \
|
||
&& unzip chromedriver-linux64.zip -d /opt/ \
|
||
&& mv /opt/chromedriver-linux64/chromedriver /usr/local/bin/ \
|
||
&& rm -rf chromedriver-linux64.zip /opt/chromedriver-linux64
|
||
|
||
RUN npm install --global yarn
|
||
|
||
RUN mkdir -p /opt/webapps/app/tmp/pids
|
||
WORKDIR /opt/webapps/app
|
||
COPY Gemfile Gemfile.lock ./
|
||
# ADD vendor/gems/omniauth-tara ./vendor/gems/omniauth-tara
|
||
RUN gem install bundler && bundle install --jobs 20 --retry 5
|
||
|
||
ENV PATH="/opt/chrome-linux64:${PATH}"
|
||
|
||
# RUN apt-get update && apt-get install -y --no-install-recommends > /dev/null \
|
||
# libc6-i386 \
|
||
# lib32gcc-s1 \
|
||
# wkhtmltopdf \
|
||
# xvfb \
|
||
# && apt-get clean \
|
||
# && rm -rf /var/lib/apt/lists/*
|
||
|
||
RUN ln -s /lib/ld-linux.so.2 /lib/ld-linux.so.2 || true
|
||
|
||
# Обертка для wkhtmltopdf с xvfb
|
||
RUN echo '#!/bin/bash\nxvfb-run -a --server-args="-screen 0, 1024x768x24" /usr/bin/wkhtmltopdf "$@"' > /usr/local/bin/wkhtmltopdf \
|
||
&& chmod +x /usr/local/bin/wkhtmltopdf
|
||
|
||
EXPOSE 3000 |