Skip to content

Commit 1b1bfaf

Browse files
committed
update; use image version :v2.9 ...
1 parent 348b8a2 commit 1b1bfaf

12 files changed

Lines changed: 31142 additions & 163 deletions

File tree

.github/workflows/docker-image.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Build and Publish Docker Image on Tag
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*' # Trigger the workflow when a new tag starting with 'v' is pushed
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
permissions:
13+
actions: read
14+
contents: read
15+
packages: write
16+
17+
steps:
18+
# Step 1: Set up Docker Buildx (supports layer caching)
19+
- name: Set up Docker Buildx
20+
uses: docker/setup-buildx-action@v2
21+
22+
# Step 2: Restore cache for Docker layers
23+
- name: Cache Docker layers
24+
uses: actions/cache@v4
25+
with:
26+
path: /tmp/.buildx-cache
27+
key: buildx-cache-${{ github.sha }}
28+
restore-keys: |
29+
buildx-cache-${{ github.sha }}
30+
buildx-cache-
31+
buildx
32+
33+
# Step 3: Check out the repository
34+
- name: Checkout repository
35+
uses: actions/checkout@v4
36+
37+
# # Step 4: Log in to registry
38+
- name: Log into registry
39+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
40+
41+
- name: Initialize cache directory
42+
run: mkdir -p /tmp/.buildx-cache
43+
44+
- name: Debug cache
45+
run: ls -l /tmp/.buildx-cache
46+
47+
# Step 5: Build and push the Docker image with caching
48+
- name: Build and Push Docker image
49+
run: |
50+
docker buildx build \
51+
--cache-from=type=local,src=/tmp/.buildx-cache \
52+
--cache-to=type=local,dest=/tmp/.buildx-cache,mode=max \
53+
--tag ghcr.io/ximeraproject/ximeraserver:${{ github.ref_name }} \
54+
--push .

.gitignore

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
2+
# node_modules is big, and presumably in/linked from the baseverver image
3+
node_modules
4+
5+
6+
# to be (re-)generated with 'npm run build'
7+
*.min.js
8+
*.min.js.map
9+
10+
# folders created/filled while running the ximeraserver
11+
repositories
12+
mongodb
13+
gpg
14+
15+
# generated while running a ximeraserver
16+
dump.rdb
17+
18+
119
lib-cov
220
ecosystem.config.js
321
private_key.pem
@@ -17,10 +35,9 @@ results
1735

1836
*~
1937

20-
public/stylesheets/base.css
38+
# public/stylesheets/base.css
2139

2240
npm-debug.log
23-
node_modules
2441
components
2542
bower_components
2643

Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM ghcr.io/ximeraproject/ximerabase:v1.3
2+
3+
WORKDIR /usr/var/server
4+
ADD . /usr/var/server
5+
6+
7+
ENTRYPOINT [ "./start.sh" ]
8+
9+

README.md

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,39 @@
11

2-
The XIMERA Project
3-
==================
2+
This repo contains a version of the Ximera server.
43

5-
This 'development' branch of the 'XimeraProject/server' repository is a temporary and adhoc way to keep track of an intermediate solution for upgrading the ximera server.
4+
# Building a ximeraserver docker image
65

7-
I might very well never be merged into master/main, e.g. if the Ximera Server would get a major rewrite.
6+
The Dockerfile adds the current folder to a `baseserver` image that is *very* old, and seems hard to rebuild/update.
87

98

9+
10+
11+
# Build of baseserver image
12+
13+
Following hack got a base server, on which the ximeraServer code con be deployed.
14+
Hopefully, at some point the baseserver will be properly (re-)build, or obsoleted alltogether.
15+
16+
The baseserver image was extracted from a KULeuven ximeraserver by a combination of
17+
18+
* docker export -o image.tar ximeraserver # extract full filesystem from
19+
* tar -xvf image.tar # extract the tar-file in an empty folder
20+
* remove some big files in usr/local/bin etc
21+
* move node_modules into usr/var/server.base
22+
* tar -cvf ../image.1.2.tar .
23+
* docker import image.1.2.tar baseserver:v1.2
24+
* docker run -it baseserver:v1.2 /bin/bash
25+
* docker cp sources.list `container`/etc/apt/sources/list
26+
* (inside container) apt install vim strace
27+
* docker commit `container` baseserver:v1.3
28+
29+
The archive-sources for the baseserver:
30+
31+
```
32+
deb [trusted=yes] http://archive.debian.org/debian/ stretch main
33+
deb-src [trusted=yes] http://archive.debian.org/debian/ stretch main
34+
deb [trusted=yes] http://archive.debian.org/debian/ stretch-backports main
35+
deb [trusted=yes] http://archive.debian.org/debian-security/ stretch/updates main
36+
deb-src [trusted=yes] http://archive.debian.org/debian-security/ stretch/updates main
37+
```
38+
39+
Don't tell anyone.
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
favicon-114x114.png
2-
favicon-54x54.png
3-
favicon-64x64.png
4-
favicon-72x72.png
5-
favicon.ico
6-
icon.png
1+
# favicon-114x114.png
2+
# favicon-54x54.png
3+
# favicon-64x64.png
4+
# favicon-72x72.png
5+
# favicon.ico
6+
# icon.png

public/stylesheets/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
*.css
1+
# *.css

0 commit comments

Comments
 (0)