Skip to content

Commit

Permalink
Merge pull request #1187 from PokeAPI/no-data-image
Browse files Browse the repository at this point in the history
Remove data from image
  • Loading branch information
Naramsim authored Jan 13, 2025
2 parents 637b6fa + 655814f commit 72398af
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,7 @@ docker-compose*
/*.js
.env
*pycache*
target
target
data/v2/cries
data/v2/csv
data/v2/sprites
31 changes: 31 additions & 0 deletions Resources/k8s/kustomize/base/deployments/pokeapi-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,23 @@ spec:
echo waiting for database;
sleep 2;
done;
- name: data-download
image: alpine:3.21.2
command: ['sh', '-c']
args:
- apk add --update git &&
git clone --depth=1 --single-branch --branch=master --recurse-submodules --shallow-submodules https://github.com/PokeAPI/pokeapi.git &&
mv /code/pokeapi/data/v2/cries/* /tmp/cries/ &&
mv /code/pokeapi/data/v2/csv/* /tmp/csv/ &&
mv /code/pokeapi/data/v2/sprites/* /tmp/sprites/
workingDir: /code
volumeMounts:
- mountPath: /tmp/cries
name: cries-data-share
- mountPath: /tmp/csv
name: csv-data-share
- mountPath: /tmp/sprites
name: sprites-data-share
containers:
- name: pokeapi
image: pokeapi/pokeapi:master
Expand Down Expand Up @@ -51,6 +68,13 @@ spec:
envFrom:
- configMapRef:
name: pokeapi-configmap
volumeMounts:
- mountPath: /code/data/v2/cries
name: cries-data-share
- mountPath: /code/data/v2/csv
name: csv-data-share
- mountPath: /code/data/v2/sprites
name: sprites-data-share
resources: {}
readinessProbe:
periodSeconds: 5
Expand All @@ -64,3 +88,10 @@ spec:
httpGet:
path: /api/v2/
port: 8080
volumes:
- name: cries-data-share
emptyDir: {}
- name: csv-data-share
emptyDir: {}
- name: sprites-data-share
emptyDir: {}

0 comments on commit 72398af

Please sign in to comment.