Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/client/nanoid-3.3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
oharsta committed Dec 17, 2024
2 parents 310725c + 545cce0 commit e4ee47a
Show file tree
Hide file tree
Showing 13 changed files with 2,136 additions and 2,062 deletions.
38 changes: 34 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ env:
REGISTRY: ghcr.io
IMAGE_NAME_SBS: surfscz/sram-sbs
IMAGE_NAME_SERVER: surfscz/sram-sbs-server
IMAGE_NAME_CLIENT: surfscz/sram-sbs-client

jobs:
Server_tests:
Expand Down Expand Up @@ -317,8 +318,8 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# The SBS image
- name: Extract metadata (tags, labels) for SBS image
# The SBS (apache) image
- name: Extract metadata (tags, labels) for SBS-server image
id: meta-sbs
uses: docker/metadata-action@v5
with:
Expand All @@ -335,8 +336,8 @@ jobs:
tags: ${{ steps.meta-sbs.outputs.tags }}
labels: ${{ steps.meta-sbs.outputs.labels }}

# The SBS (apache) server image
- name: Extract metadata (tags, labels) for SBS-server image
# The SBS server image
- name: Extract metadata (tags, labels) for SBS image
id: meta-sbs-server
uses: docker/metadata-action@v5
with:
Expand All @@ -353,6 +354,35 @@ jobs:
tags: ${{ steps.meta-sbs-server.outputs.tags }}
labels: ${{ steps.meta-sbs-server.outputs.labels }}


# The SBS client image
- name: Extract metadata (tags, labels) for SBS-client image
id: meta-sbs-client
uses: docker/metadata-action@v5
with:
images: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME_CLIENT }}
- name: Build and push Docker SBS-client image
uses: docker/build-push-action@v5
with:
context: "."
file: "Dockerfile.sbs-client"
pull: true
push: true
tags: ${{ steps.meta-sbs-client.outputs.tags }}
labels: ${{ steps.meta-sbs-client.outputs.labels }}

# Setup tmate session
- name: Setup tmate session
env:
ACTIONS_STEP_DEBUG: ${{ secrets.ACTIONS_STEP_DEBUG}}
if: ${{ failure() && env.ACTIONS_STEP_DEBUG == 'true' }}
uses: mxschmitt/action-tmate@v3
with:
limit-access-to-actor: true
timeout-minutes: 60

Schema_pr:
name: Update schema cache

Expand Down
40 changes: 6 additions & 34 deletions Dockerfile.sbs
Original file line number Diff line number Diff line change
@@ -1,47 +1,19 @@
# First build SRAM SBS image
FROM python:3.11-slim-bookworm AS sram-sbs
# Build SRAM SBS (apache) server image
FROM ghcr.io/openconext/openconext-basecontainers/apache2:latest AS sram-sbs-server

# Do an initial clean up and general upgrade of the distribution
ENV DEBIAN_FRONTEND noninteractive
RUN apt clean && apt autoclean && apt update
RUN apt -y upgrade && apt -y dist-upgrade

# Install the packages we need
RUN apt install -y curl \
git \
build-essential \
pkgconf \
python3-dev \
default-libmysqlclient-dev \
libxmlsec1-dev

# Clean up
RUN apt autoremove -y && apt clean && apt autoclean && rm -rf /var/lib/apt/lists/*

# Set the default workdir
WORKDIR /opt

# Install SBS
COPY sbs.tar.xz /opt/sbs.tar.xz

# Untar sbs
RUN tar -Jxf sbs.tar.xz

# Create venv dir
#RUN virtualenv /opt/sbs

#RUN . /opt/sbs/bin/activate && \
RUN pip install -r /opt/sbs/server/requirements/test.txt

# Copy entrypoint
COPY misc/entrypoint.sh /entrypoint.sh
RUN chmod 755 /entrypoint.sh
RUN rm -f /etc/apache2/sites-enabled/*.conf
COPY etc/apache-dev.conf /etc/apache2/sites-enabled/apache.conf

# Set the default workdir
WORKDIR /opt/sbs

EXPOSE 8080
WORKDIR /opt

ENTRYPOINT ["/entrypoint.sh"]
#CMD ["bash"]
CMD ["/usr/local/bin/gunicorn --worker-class eventlet --workers 8 --bind 0.0.0.0:8080 server.__main__:app"]

29 changes: 29 additions & 0 deletions Dockerfile.sbs-client
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Build SRAM SBS (apache) server image
FROM ghcr.io/openconext/openconext-basecontainers/apache2:latest AS sram-sbs-client

# Do an initial clean up and general upgrade of the distribution
ENV DEBIAN_FRONTEND noninteractive
RUN apt clean && apt autoclean && apt update
RUN apt -y upgrade && apt -y dist-upgrade

# Install the packages we need
RUN apt install -y xz-utils

# Clean up
RUN apt autoremove -y && apt clean && apt autoclean && rm -rf /var/lib/apt/lists/*

RUN rm -f /etc/apache2/sites-enabled/*.conf
COPY etc/apache.conf /etc/apache2/sites-enabled/apache.conf

RUN a2enmod proxy_wstunnel

# Set the default workdir
WORKDIR /opt

# Install SBS
COPY sbs.tar.xz /opt/sbs.tar.xz

# Untar sbs
RUN tar -Jxf sbs.tar.xz

#CMD ["bash"]
47 changes: 42 additions & 5 deletions Dockerfile.sbs-server
Original file line number Diff line number Diff line change
@@ -1,10 +1,47 @@
# Build SRAM SBS (apache) server image
FROM ghcr.io/openconext/openconext-basecontainers/apache2:latest AS sram-sbs-server
RUN rm -f /etc/apache2/sites-enabled/*.conf
RUN a2enmod proxy_wstunnel
# First build SRAM SBS image
FROM python:3.11-slim-bookworm AS sram-sbs-server

# Do an initial clean up and general upgrade of the distribution
ENV DEBIAN_FRONTEND noninteractive
RUN apt clean && apt autoclean && apt update
RUN apt -y upgrade && apt -y dist-upgrade

# Install the packages we need
RUN apt install -y curl \
git \
build-essential \
pkgconf \
python3-dev \
default-libmysqlclient-dev \
libxmlsec1-dev

# Clean up
RUN apt autoremove -y && apt clean && apt autoclean && rm -rf /var/lib/apt/lists/*

# Set the default workdir
WORKDIR /opt

#CMD ["bash"]
# Install SBS
COPY sbs.tar.xz /opt/sbs.tar.xz

# Untar sbs
RUN tar -Jxf sbs.tar.xz

# Create venv dir
#RUN virtualenv /opt/sbs

#RUN . /opt/sbs/bin/activate && \
RUN pip install -r /opt/sbs/server/requirements/test.txt

# Copy entrypoint
COPY misc/entrypoint.sh /entrypoint.sh
RUN chmod 755 /entrypoint.sh

# Set the default workdir
WORKDIR /opt/sbs

EXPOSE 8080

ENTRYPOINT ["/entrypoint.sh"]
#CMD ["bash"]
CMD ["/usr/local/bin/gunicorn --worker-class eventlet --workers 8 --bind 0.0.0.0:8080 server.__main__:app"]
12 changes: 6 additions & 6 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
"@fortawesome/fontawesome-svg-core": "^6.7.1",
"@fortawesome/free-solid-svg-icons": "^6.7.1",
"@fortawesome/react-fontawesome": "^0.2.2",
"@surfnet/sds": "^0.0.118",
"@surfnet/sds": "^0.0.119",
"core-js": "^3.39.0",
"detect-browser": "^5.3.0",
"dompurify": "^3.2.2",
"dompurify": "^3.2.3",
"es6-promise": "^4.2.8",
"events": "^3.2.0",
"i18n-js": "^4.5.0",
"i18n-js": "^4.5.1",
"immer": "^10.1.1",
"isomorphic-dompurify": "^2.18.0",
"js-cookie": "^3.0.1",
Expand All @@ -37,7 +37,7 @@
"react-router-dom": "^5.2.0",
"react-select": "^5.8.3",
"react-tooltip": "^5.28.0",
"recharts": "^2.13.3",
"recharts": "^2.15.0",
"scroll-into-view": "^1.15.0",
"serialize-javascript": "^6.0.2",
"showdown": "^2.1.0",
Expand All @@ -50,15 +50,15 @@
"eslint-plugin-risxss": "^2.1.0",
"http-proxy-middleware": "^3.0.3",
"react-scripts": "^5.0.1",
"sass": "^1.81.0"
"sass": "^1.83.0"
},
"resolutions": {
"minimatch": "^9.0.4",
"tough-cookie": "4.1.4",
"ws": "^8.17.1"
},
"scripts": {
"start": "DANGEROUSLY_DISABLE_HOST_CHECK=true GENERATE_SOURCEMAP=false HOST=localhost react-scripts start",
"start": "DANGEROUSLY_DISABLE_HOST_CHECK=true GENERATE_SOURCEMAP=false react-scripts start",
"build": "DANGEROUSLY_DISABLE_HOST_CHECK=true GENERATE_SOURCEMAP=true react-scripts build",
"test": "DANGEROUSLY_DISABLE_HOST_CHECK=true GENERATE_SOURCEMAP=false react-scripts test --transformIgnorePatterns 'node_modules/(?!i18n-js)/'",
"analyze": "source-map-explorer build/static/js/main.*.js "
Expand Down
Loading

0 comments on commit e4ee47a

Please sign in to comment.