Skip to content

Commit ccfda11

Browse files
chore: Atualizar suporte ao APKO e ao Melange, atualizar dependências
1 parent 8dd9ee4 commit ccfda11

10 files changed

+750
-23
lines changed

Diff for: chainguard/apko.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ accounts:
1414
uid: 65532
1515
run-as: 65532
1616
entrypoint:
17-
command: /usr/bin/app
17+
command: /usr/share/webapps/app/app

Diff for: chainguard/app.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
redis_user = os.environ.get("REDIS_USER")
1313
redis_pass = os.environ.get("REDIS_PASS")
1414

15-
r = redis.StrictRedis(host=redis_host, port=redis_port, password=redis_pass, decode_responses=True)
15+
r = redis.StrictRedis(host=redis_host, port=redis_port, password="", decode_responses=True)
1616

1717
senha_gerada_counter = Counter('senha_gerada', 'Contador de senhas geradas')
1818

@@ -77,4 +77,4 @@ def ping():
7777
return jsonify({"status": "healthy"}), 200
7878

7979
if __name__ == '__main__':
80-
app.run(debug=False)
80+
app.run(debug=False, host='0.0.0.0', port=5000)

Diff for: chainguard/docker-compose.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
services:
2+
giropops-senhas:
3+
# image: nataliagranato/giropops-senhas:v1.1.0
4+
image: giropos-melange-apko:v1.0-amd64
5+
ports:
6+
- "5000:5000"
7+
networks:
8+
- giropops-senhas
9+
environment:
10+
- REDIS_HOST=redis
11+
- REDIS_PORT=6379
12+
volumes:
13+
- natalia:/granato
14+
deploy:
15+
replicas: 1
16+
resources:
17+
reservations:
18+
cpus: '0.25'
19+
memory: 128M
20+
limits:
21+
cpus: '0.50'
22+
memory: 256M
23+
depends_on:
24+
- redis
25+
26+
redis:
27+
image: nataliagranato/redis:v1.0.0
28+
networks:
29+
- giropops-senhas
30+
ports:
31+
- "6380:6379"
32+
volumes:
33+
- redis-data:/data
34+
healthcheck:
35+
test: ["CMD", "redis-cli", "ping"]
36+
interval: 30s
37+
timeout: 5s
38+
retries: 3
39+
start_period: 10s
40+
41+
networks:
42+
giropops-senhas:
43+
driver: bridge
44+
45+
volumes:
46+
redis-data:
47+
natalia:

Diff for: chainguard/giropops-senhas.tar

19.2 MB
Binary file not shown.

Diff for: chainguard/melange.yaml

+6-20
Original file line numberDiff line numberDiff line change
@@ -26,29 +26,15 @@ environment:
2626
- py3-pip
2727
- py3-virtualenv
2828

29-
#pipeline:
30-
#- name: Build Python application
31-
# runs: |
32-
# EXECDIR="${{targets.destdir}}/usr/bin"
33-
# WEBAPPDIR="${{targets.destdir}}/usr/share/webapps/app"
34-
# mkdir -p "${EXECDIR}" "${WEBAPPDIR}"
35-
# echo "#!/usr/share/webapps/app/venv/bin/python3" > "${EXECDIR}/app"
36-
# cat app.py >> "${EXECDIR}/app"
37-
# chmod +x "${EXECDIR}/app"
38-
# cp -r static "${EXECDIR}/"
39-
# cp -r templates "${EXECDIR}/"
40-
# virtualenv "${EXECDIR}/venv"
41-
# sh -c "source '${EDIR}/venv/bin/activate' && pip install -r requirements.txt"
42-
43-
4429
pipeline:
4530
- name: Build Python application
4631
runs: |
47-
EXECDIR="${{targets.destdir}}/usr/bin"
4832
WEBAPPDIR="${{targets.destdir}}/usr/share/webapps/app"
49-
mkdir -p "${EXECDIR}" "${WEBAPPDIR}"
50-
echo "#!/usr/share/webapps/app/venv/bin/python3" > "${EXECDIR}/app"
51-
cat app.py >> "${EXECDIR}/app"
52-
chmod +x "${EXECDIR}/app"
33+
mkdir -p "${WEBAPPDIR}"
34+
echo "#!/usr/share/webapps/app/venv/bin/python3" > "${WEBAPPDIR}/app"
35+
cat app.py >> "${WEBAPPDIR}/app"
36+
chmod +x "${WEBAPPDIR}/app"
37+
cp -r templates "${WEBAPPDIR}"
38+
cp -r static "${WEBAPPDIR}"
5339
virtualenv "${WEBAPPDIR}/venv"
5440
sh -c "source '${WEBAPPDIR}/venv/bin/activate' && pip install -r requirements.txt"

Diff for: chainguard/packages/x86_64/APKINDEX.json

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"Signature": null,
3+
"Description": "",
4+
"Packages": [
5+
{
6+
"Name": "giropops-senhas",
7+
"Version": "0.1.0-r0",
8+
"Arch": "x86_64",
9+
"Description": "Um gerador de senhas.",
10+
"License": "Apache-2.0",
11+
"Origin": "giropops-senhas",
12+
"Maintainer": "",
13+
"URL": "",
14+
"Checksum": "3Gaw+6uYvhvgSz0TsnaU8PiWjcw=",
15+
"Dependencies": [
16+
"python3",
17+
"so:libc.musl-x86_64.so.1"
18+
],
19+
"Provides": null,
20+
"InstallIf": null,
21+
"Size": 6162989,
22+
"InstalledSize": 17924626,
23+
"ProviderPriority": 0,
24+
"BuildTime": "1970-01-01T00:00:00Z",
25+
"BuildDate": 0,
26+
"RepoCommit": "",
27+
"Replaces": null,
28+
"DataHash": "521c0d317865196843353eb1c5768d97a400cf3457ea4e762058d6ea561e6fcc"
29+
}
30+
]
31+
}

Diff for: chainguard/packages/x86_64/APKINDEX.tar.gz

922 Bytes
Binary file not shown.
5.88 MB
Binary file not shown.

Diff for: chainguard/sbom-index.spdx.json

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{
2+
"SPDXID": "SPDXRef-DOCUMENT",
3+
"name": "sbom-sha256:a6d046f269ccf854eb5790febd602411dfe1075a0f1b8977725436d059a32507",
4+
"spdxVersion": "SPDX-2.3",
5+
"creationInfo": {
6+
"created": "2024-08-13T15:22:27Z",
7+
"creators": [
8+
"Tool: apko (v0.14.7)",
9+
"Organization: Chainguard, Inc"
10+
],
11+
"licenseListVersion": "3.16"
12+
},
13+
"dataLicense": "CC0-1.0",
14+
"documentNamespace": "https://spdx.org/spdxdocs/apko/",
15+
"documentDescribes": [
16+
"SPDXRef-Package-sha256-a6d046f269ccf854eb5790febd602411dfe1075a0f1b8977725436d059a32507"
17+
],
18+
"packages": [
19+
{
20+
"SPDXID": "SPDXRef-Package-sha256-a6d046f269ccf854eb5790febd602411dfe1075a0f1b8977725436d059a32507",
21+
"name": "sha256:a6d046f269ccf854eb5790febd602411dfe1075a0f1b8977725436d059a32507",
22+
"versionInfo": "sha256:a6d046f269ccf854eb5790febd602411dfe1075a0f1b8977725436d059a32507",
23+
"filesAnalyzed": false,
24+
"description": "Multi-arch image index",
25+
"downloadLocation": "NOASSERTION",
26+
"supplier": "Organization: Chainguard, Inc.",
27+
"sourceInfo": "Generated at image build time by apko",
28+
"primaryPackagePurpose": "CONTAINER",
29+
"checksums": [
30+
{
31+
"algorithm": "SHA256",
32+
"checksumValue": "a6d046f269ccf854eb5790febd602411dfe1075a0f1b8977725436d059a32507"
33+
}
34+
],
35+
"externalRefs": [
36+
{
37+
"referenceCategory": "PACKAGE-MANAGER",
38+
"referenceLocator": "pkg:oci/giropos-melange-apko@sha256%3Aa6d046f269ccf854eb5790febd602411dfe1075a0f1b8977725436d059a32507?mediaType=application%2Fvnd.oci.image.index.v1%2Bjson",
39+
"referenceType": "purl"
40+
}
41+
]
42+
},
43+
{
44+
"SPDXID": "SPDXRef-Package-sha256-cbef629874b3e2eaa41ff2869e616be1017336af239b5a0109e0bc26818a399b",
45+
"name": "sha256:cbef629874b3e2eaa41ff2869e616be1017336af239b5a0109e0bc26818a399b",
46+
"versionInfo": "sha256:cbef629874b3e2eaa41ff2869e616be1017336af239b5a0109e0bc26818a399b",
47+
"filesAnalyzed": false,
48+
"downloadLocation": "NOASSERTION",
49+
"supplier": "Organization: Chainguard, Inc.",
50+
"primaryPackagePurpose": "CONTAINER",
51+
"checksums": [
52+
{
53+
"algorithm": "SHA256",
54+
"checksumValue": "cbef629874b3e2eaa41ff2869e616be1017336af239b5a0109e0bc26818a399b"
55+
}
56+
],
57+
"externalRefs": [
58+
{
59+
"referenceCategory": "PACKAGE-MANAGER",
60+
"referenceLocator": "pkg:oci/giropos-melange-apko@sha256%3Acbef629874b3e2eaa41ff2869e616be1017336af239b5a0109e0bc26818a399b?arch=amd64\u0026mediaType=application%2Fvnd.oci.image.manifest.v1%2Bjson\u0026os=linux",
61+
"referenceType": "purl"
62+
}
63+
]
64+
}
65+
],
66+
"relationships": [
67+
{
68+
"spdxElementId": "SPDXRef-Package-sha256-a6d046f269ccf854eb5790febd602411dfe1075a0f1b8977725436d059a32507",
69+
"relationshipType": "VARIANT_OF",
70+
"relatedSpdxElement": "SPDXRef-Package-sha256-cbef629874b3e2eaa41ff2869e616be1017336af239b5a0109e0bc26818a399b"
71+
}
72+
]
73+
}

0 commit comments

Comments
 (0)