47 lines
1.7 KiB
Docker
47 lines
1.7 KiB
Docker
FROM docker.io/opensuse/leap:latest
|
|
|
|
# Double-checkng systemd service dependencies when upgrading OBS Server
|
|
#
|
|
ARG OBS_SERVER_VERSION=Unstable
|
|
|
|
RUN zypper mr -da && \
|
|
zypper ar -f "https://download.opensuse.org/repositories/OBS:/Server:/${OBS_SERVER_VERSION}/$(. /etc/os-release && echo "$VERSION")/" OBS:Server:${OBS_SERVER_VERSION} && \
|
|
zypper --gpg-auto-import-keys refresh && \
|
|
zypper ar -p 98 -cfg 'https://mirror.iscas.ac.cn/opensuse/distribution/leap/$releasever/repo/oss/' mirror-oss && \
|
|
zypper ar -p 98 -cfg 'https://mirror.iscas.ac.cn/opensuse/distribution/leap/$releasever/repo/non-oss/' mirror-non-oss && \
|
|
zypper ar -p 98 -cfg 'https://mirror.iscas.ac.cn/opensuse/update/leap/$releasever/oss/' mirror-update && \
|
|
zypper ar -p 98 -cfg 'https://mirror.iscas.ac.cn/opensuse/update/leap/$releasever/non-oss/' mirror-update-non-oss && \
|
|
zypper install -y \
|
|
obs-api \
|
|
supervisor \
|
|
&& \
|
|
zypper clean
|
|
|
|
COPY frontend-files /obs
|
|
COPY common-files /obs
|
|
|
|
RUN update-alternatives --set rake /usr/bin/rake.ruby.ruby3.4
|
|
RUN perl -p -i -e \
|
|
's#^(\s*)PassengerRuby "/usr/bin/ruby"#$1\PassengerRuby "/usr/bin/ruby.ruby3.4"#' \
|
|
/etc/apache2/conf.d/mod_passenger.conf
|
|
RUN sed -ri 's/^(APACHE_MODULES=.+)"$/\1 passenger rewrite proxy proxy_http xforward headers socache_shmcb"/g' /etc/sysconfig/apache2
|
|
|
|
#ENTRYPOINT ["bash"]
|
|
ENTRYPOINT ["/obs/entrypoint.sh"]
|
|
|
|
EXPOSE 80/tcp
|
|
|
|
ENV OBS_SRC_SERVER="http://localhost:5352"
|
|
|
|
ENV OBS_DB_HOST=127.0.0.1
|
|
ENV OBS_DB_PORT=3306
|
|
ENV OBS_DB_DATABASE=api_production
|
|
ENV OBS_DB_USER=obsapiuser
|
|
ENV OBS_DB_PASSWD=obstopsecret
|
|
|
|
ENV OBS_FRONTEND_HOSTNAME=127.0.0.1
|
|
ENV OBS_FRONTEND_PORT=80
|
|
ENV OBS_FRONTEND_PROTO=http
|
|
|
|
ENV RAILS_ENV=production
|