forked from hazza/resourcespace-docker
38
.github/workflows/build-and-push.yml
vendored
Normal file
38
.github/workflows/build-and-push.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
name: Publish Docker container
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main # or the default branch of your repository
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-push:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check out the repo
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Get short SHA
|
||||||
|
id: short-sha
|
||||||
|
run: echo "::set-output name=sha::$(echo $GITHUB_SHA | cut -c1-6)"
|
||||||
|
|
||||||
|
- name: Log in to GitHub Container Registry
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build and push Docker image
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./Dockerfile
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
ghcr.io/${{ github.repository }}/resourcespace:latest
|
||||||
|
ghcr.io/${{ github.repository }}/resourcespace:${{ steps.short-sha.outputs.sha }}
|
29
Dockerfile
29
Dockerfile
@@ -1,6 +1,9 @@
|
|||||||
FROM ubuntu:latest
|
FROM ubuntu:24.04
|
||||||
MAINTAINER Montala Ltd
|
|
||||||
|
LABEL org.opencontainers.image.authors="Montala Ltd"
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND="noninteractive"
|
ENV DEBIAN_FRONTEND="noninteractive"
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
nano \
|
nano \
|
||||||
imagemagick \
|
imagemagick \
|
||||||
@@ -28,11 +31,13 @@ RUN apt-get update && apt-get install -y \
|
|||||||
python3-opencv \
|
python3-opencv \
|
||||||
python3 \
|
python3 \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
|
&& apt-get clean \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
RUN sed -i -e "s/upload_max_filesize\s*=\s*2M/upload_max_filesize = 100M/g" /etc/php/8.3/apache2/php.ini
|
|
||||||
RUN sed -i -e "s/post_max_size\s*=\s*8M/post_max_size = 100M/g" /etc/php/8.3/apache2/php.ini
|
RUN sed -i -e "s/upload_max_filesize\s*=\s*2M/upload_max_filesize = 100M/g" /etc/php/8.3/apache2/php.ini \
|
||||||
RUN sed -i -e "s/max_execution_time\s*=\s*30/max_execution_time = 300/g" /etc/php/8.3/apache2/php.ini
|
&& sed -i -e "s/post_max_size\s*=\s*8M/post_max_size = 100M/g" /etc/php/8.3/apache2/php.ini \
|
||||||
RUN sed -i -e "s/memory_limit\s*=\s*128M/memory_limit = 1G/g" /etc/php/8.3/apache2/php.ini
|
&& sed -i -e "s/max_execution_time\s*=\s*30/max_execution_time = 300/g" /etc/php/8.3/apache2/php.ini \
|
||||||
|
&& sed -i -e "s/memory_limit\s*=\s*128M/memory_limit = 1G/g" /etc/php/8.3/apache2/php.ini
|
||||||
|
|
||||||
RUN printf '<Directory /var/www/>\n\
|
RUN printf '<Directory /var/www/>\n\
|
||||||
\tOptions FollowSymLinks\n\
|
\tOptions FollowSymLinks\n\
|
||||||
@@ -42,9 +47,11 @@ RUN printf '<Directory /var/www/>\n\
|
|||||||
ADD cronjob /etc/cron.daily/resourcespace
|
ADD cronjob /etc/cron.daily/resourcespace
|
||||||
|
|
||||||
WORKDIR /var/www/html
|
WORKDIR /var/www/html
|
||||||
RUN rm index.html
|
|
||||||
RUN svn co -q https://svn.resourcespace.com/svn/rs/releases/10.5 .
|
RUN rm -f index.html \
|
||||||
RUN mkdir filestore
|
&& svn co -q https://svn.resourcespace.com/svn/rs/releases/10.5 . \
|
||||||
RUN chmod 777 filestore
|
&& mkdir -p filestore \
|
||||||
RUN chmod -R 777 include/
|
&& chmod 777 filestore \
|
||||||
|
&& chmod -R 777 include/
|
||||||
|
|
||||||
CMD apachectl -D FOREGROUND
|
CMD apachectl -D FOREGROUND
|
||||||
|
Reference in New Issue
Block a user