Skip to content

Commit dbb9863

Browse files
authored
Merge branch '2.x-docker-image' of 'https://github.com/jjmerchante/grimoirelab'
Merges #783 Closes #783
2 parents 097e0c8 + e4eb377 commit dbb9863

File tree

13 files changed

+1331
-1343
lines changed

13 files changed

+1331
-1343
lines changed

.github/workflows/docker-image.yml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,17 @@ jobs:
1515
build-image:
1616
runs-on: ubuntu-latest
1717
environment: docker-release
18+
permissions:
19+
contents: read
20+
id-token: write # needed for signing the images with GitHub OIDC Token
21+
1822
steps:
1923
- name: Install Cosign
20-
uses: sigstore/cosign-installer@11086d25041f77fe8fe7b9ea4e48e3b9192b8f19 # v3.1.2
24+
uses: sigstore/cosign-installer@d58896d6a1865668819e1d91763c7751a165e159 # v3.9.2
2125

2226
- name: Docker metadata
2327
id: meta
24-
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
28+
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
2529
with:
2630
images: |
2731
${{ env.DOCKER_IMAGE_NAME }}
@@ -30,33 +34,35 @@ jobs:
3034
type=raw,value=${{ inputs.version }}
3135
3236
- name: Set up QEMU
33-
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0
37+
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
3438
with:
3539
platforms: linux/arm64
3640

3741
- name: Set up Docker Buildx
38-
uses: docker/setup-buildx-action@2b51285047da1547ffb1b2203d8be4c0af6b1f20 # v3.2.0
42+
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
3943

4044
- name: Login to DockerHub
41-
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
45+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
4246
with:
4347
username: ${{ secrets.DOCKERHUB_USERNAME }}
4448
password: ${{ secrets.DOCKERHUB_TOKEN }}
4549

4650
- name: Build and push
4751
id: build-and-push
48-
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
52+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
4953
with:
5054
platforms: linux/amd64,linux/arm64
5155
context: "{{defaultContext}}:docker"
5256
push: true
5357
tags: ${{ steps.meta.outputs.tags }}
5458

55-
- name: Sign image with a key
56-
run: |
57-
echo "${TAGS}" | xargs -I {} cosign sign -y -r --key env://COSIGN_PRIVATE_KEY "{}@${DIGEST}"
59+
- name: Sign the images with GitHub OIDC Token
5860
env:
59-
TAGS: ${{ steps.meta.outputs.tags }}
60-
COSIGN_PRIVATE_KEY: ${{secrets.COSIGN_PRIVATE_KEY}}
61-
COSIGN_PASSWORD: ${{secrets.COSIGN_PASSWORD}}
6261
DIGEST: ${{ steps.build-and-push.outputs.digest }}
62+
TAGS: ${{ steps.meta.outputs.tags }}
63+
run: |
64+
images=""
65+
for tag in ${TAGS}; do
66+
images+="${tag}@${DIGEST} "
67+
done
68+
cosign sign --yes ${images}

.github/workflows/tests.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ jobs:
3131
python-version: ${{ matrix.python-version }}
3232
- name: Install poetry
3333
run: |
34-
curl -sSL https://install.python-poetry.org | python3 -
35-
echo "PATH=$HOME/.poetry/bin:$PATH" >> $GITHUB_ENV
34+
pipx install poetry
3635
- name: Install dependencies
3736
run: |
3837
poetry install --with tests -vvv

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ or visiting the [GrimoireLab website](https://chaoss.github.io/grimoirelab).
2323
- Linux/MacOS (Windows not supported yet)
2424
- Python >= 3.11
2525
- MySQL >= 8.0/ MariaDB >= 11.4
26-
- Redis database >= 7.4
26+
- Redis / Valkey database
2727
- OpenSearch >= 2.0
2828

2929
To simplify the setup of the development environment, you can use the provided
@@ -104,7 +104,7 @@ Some environment variables you might need to change are:
104104

105105
- **GrimoireLab common settings**:
106106
- `GRIMOIRELAB_DEBUG`: to activate the debug mode (`true` or `false` values)
107-
- **Redis configuration**
107+
- **Redis/Valkey configuration**
108108
- `GRIMOIRELAB_REDIS_HOST`: ip address of the server
109109
- `GRIMOIRELAB_REDIS_PORT`: port of the server
110110
- `GRIMOIRELAB_REDIS_PASSWORD`: password for the server

default-grimoirelab-settings/nginx.conf.template

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11

2-
upstream sortinghat {
3-
server sortinghat:9314;
4-
}
52
upstream grimoirelab_core {
63
server grimoirelab_core:9314;
74
}
@@ -21,23 +18,6 @@ server {
2118
uwsgi_param X-Forwarded-Proto $http_x_forwarded_proto;
2219
}
2320

24-
location /identities {
25-
rewrite ^/identities/(.*) /$1 break;
26-
27-
include /etc/nginx/uwsgi_params;
28-
uwsgi_pass sortinghat;
29-
uwsgi_param Host $host;
30-
uwsgi_param X-Real-IP $remote_addr;
31-
uwsgi_param X-Forwarded-For $proxy_add_x_forwarded_for;
32-
uwsgi_param X-Forwarded-Proto $http_x_forwarded_proto;
33-
}
34-
35-
location ~ ^/identities/(css|js|fonts)/ {
36-
rewrite ^/identities/(.*) /$1 break;
37-
38-
root /sortinghat;
39-
}
40-
4121
location /static/ {
4222
alias /grimoirelab_core/;
4323
}

docker-compose/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ for running GrimoireLab in development mode.
8383
By default, it includes:
8484

8585
- MariaDB running on port 3306
86-
- Redis running on port 6379
86+
- Valkey running on port 6379
8787
- OpenSearch running on port 9200
8888
- OpenSearch Dashboards running on port 5601
8989

Lines changed: 16 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,20 @@
1-
version: '2.2'
2-
31
services:
4-
mariadb:
5-
image: mariadb:11.4
6-
ports:
7-
- "3306:3306"
8-
environment:
9-
- MYSQL_ROOT_PASSWORD=
10-
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
11-
healthcheck:
12-
test: [ "CMD", "/usr/local/bin/healthcheck.sh", "--su=root", "--connect", "--innodb_initialized" ]
13-
retries: 5
2+
mariadb:
3+
extends:
4+
file: ./docker-compose.yml
5+
service: mariadb
146

15-
redis:
16-
image: redis:7.4
17-
ports:
18-
- "6379:6379"
19-
healthcheck:
20-
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
21-
retries: 5
7+
valkey:
8+
extends:
9+
file: ./docker-compose.yml
10+
service: valkey
2211

23-
opensearch-node1:
24-
image: opensearchproject/opensearch:2.11.1
25-
environment:
26-
- cluster.name=opensearch-cluster
27-
- node.name=opensearch-node1
28-
- discovery.type=single-node
29-
- bootstrap.memory_lock=true
30-
- "OPENSEARCH_JAVA_OPTS=-Xms1g -Xmx1g"
31-
ulimits:
32-
memlock:
33-
soft: -1
34-
hard: -1
35-
nofile:
36-
soft: 65536
37-
hard: 65536
38-
ports:
39-
- 9200:9200
40-
- 9600:9600
12+
opensearch-node1:
13+
extends:
14+
file: ./docker-compose.yml
15+
service: opensearch-node1
4116

42-
opensearch-dashboards:
43-
image: opensearchproject/opensearch-dashboards:2.11.1
44-
ports:
45-
- 5601:5601
46-
expose:
47-
- "5601"
48-
environment:
49-
OPENSEARCH_HOSTS: '["https://opensearch-node1:9200"]'
17+
opensearch-dashboards:
18+
extends:
19+
file: ./docker-compose.yml
20+
service: opensearch-dashboards

0 commit comments

Comments
 (0)