From 27946331588895271237ecbfa2052fc255fc1b8d Mon Sep 17 00:00:00 2001 From: Diogo Scudelletti Date: Tue, 24 Sep 2024 08:48:11 +0200 Subject: [PATCH 1/4] Improve readme with helm information --- examples/sample-app/README.md | 37 +++++++++++++++++++++++++++++++ examples/sample-app/src/README.md | 24 -------------------- 2 files changed, 37 insertions(+), 24 deletions(-) create mode 100644 examples/sample-app/README.md delete mode 100644 examples/sample-app/src/README.md diff --git a/examples/sample-app/README.md b/examples/sample-app/README.md new file mode 100644 index 0000000..6b79ade --- /dev/null +++ b/examples/sample-app/README.md @@ -0,0 +1,37 @@ +## Images +### Build Images +```sh +docker build -f Dockerfile.web . -t sample-app:web +docker build -f Dockerfile.worker . -t sample-app:worker +docker build -f Dockerfile.worker . -t sample-app:migration +``` + +### Run Containers +```sh +docker run -it -p 9292:9292 sample-app:web +docker run -it sample-app:worker +docker run -it sample-app:migration +``` + +## Helm +### Deploy +```sh +helm install sample-app-web helm-web/ +helm install sample-app-worker helm-worker/ +``` + +## Application +### Server +```sh +rackup --host 0.0.0.0 +``` + +### Worker +```sh +ruby worker.rb +``` + +### Migration +```sh +ruby migration.rb +``` diff --git a/examples/sample-app/src/README.md b/examples/sample-app/src/README.md deleted file mode 100644 index 1817c35..0000000 --- a/examples/sample-app/src/README.md +++ /dev/null @@ -1,24 +0,0 @@ -### Build Image -```sh -docker build -f Dockerfile . -t sample-app -``` - -### Run Container -```sh -docker run -it -p 9292:9292 sample-app -``` - -### Server -```sh -rackup --host 0.0.0.0 -``` - -### Worker -```sh -ruby worker.rb -``` - -### Migration -```sh -ruby migration.rb -``` From f72ef74cf28f68b733978f0d2c0eac6d064c1413 Mon Sep 17 00:00:00 2001 From: Diogo Scudelletti Date: Tue, 24 Sep 2024 08:49:01 +0200 Subject: [PATCH 2/4] Update example app dependencies --- examples/sample-app/Dockerfile.web | 5 ++--- examples/sample-app/Dockerfile.worker | 4 ++-- examples/sample-app/src/Gemfile.lock | 7 ++++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/sample-app/Dockerfile.web b/examples/sample-app/Dockerfile.web index bf86ae2..676ce5c 100644 --- a/examples/sample-app/Dockerfile.web +++ b/examples/sample-app/Dockerfile.web @@ -1,4 +1,4 @@ -FROM ruby:3.1-alpine +FROM ruby:3.3-alpine WORKDIR /app @@ -10,5 +10,4 @@ COPY src /app EXPOSE 9292 -ENTRYPOINT /bin/sh -CMD /app/web.sh \ No newline at end of file +CMD ["/app/web.sh"] \ No newline at end of file diff --git a/examples/sample-app/Dockerfile.worker b/examples/sample-app/Dockerfile.worker index 564a617..77371e0 100644 --- a/examples/sample-app/Dockerfile.worker +++ b/examples/sample-app/Dockerfile.worker @@ -1,4 +1,4 @@ -FROM ruby:3.1-alpine +FROM ruby:3.3-alpine WORKDIR /app @@ -8,4 +8,4 @@ COPY src/Gemfile.lock /app/Gemfile.lock RUN bundle install COPY src /app -ENTRYPOINT /app/worker.sh \ No newline at end of file +CMD ["/app/worker.sh"] \ No newline at end of file diff --git a/examples/sample-app/src/Gemfile.lock b/examples/sample-app/src/Gemfile.lock index a355027..b32acde 100644 --- a/examples/sample-app/src/Gemfile.lock +++ b/examples/sample-app/src/Gemfile.lock @@ -1,17 +1,18 @@ GEM remote: https://rubygems.org/ specs: - rack (3.0.8) + rack (3.1.7) rackup (2.1.0) rack (>= 3) webrick (~> 1.8) - webrick (1.8.1) + webrick (1.8.2) PLATFORMS x86_64-darwin-22 + x86_64-darwin-23 DEPENDENCIES rackup (~> 2.1) BUNDLED WITH - 2.4.10 + 2.5.19 From dbc64dadc689ecf14802af82cc18af7948dbb1bc Mon Sep 17 00:00:00 2001 From: Diogo Scudelletti Date: Tue, 24 Sep 2024 08:49:18 +0200 Subject: [PATCH 3/4] Update example app charts --- examples/sample-app/helm-web/Chart.lock | 6 +++--- examples/sample-app/helm-web/Chart.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/sample-app/helm-web/Chart.lock b/examples/sample-app/helm-web/Chart.lock index 61bd523..a1af6ca 100644 --- a/examples/sample-app/helm-web/Chart.lock +++ b/examples/sample-app/helm-web/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: hm-basic-webapp repository: file://../../../hm-basic-webapp - version: 3.10.0 -digest: sha256:53ac375c63e33f2947f6565337344b3e5ff8e0e595a3c2cc0854a36772b194bd -generated: "2024-04-09T14:04:26.389941+02:00" + version: 3.10.1 +digest: sha256:b23e0903f20dfaa439a716a1d2bb13d4ca03cdf13d449d82c5b428a63f2f7ffe +generated: "2024-09-24T08:36:14.006075+02:00" diff --git a/examples/sample-app/helm-web/Chart.yaml b/examples/sample-app/helm-web/Chart.yaml index 3b7b3e0..1542b3d 100644 --- a/examples/sample-app/helm-web/Chart.yaml +++ b/examples/sample-app/helm-web/Chart.yaml @@ -7,5 +7,5 @@ appVersion: "1.16.0" dependencies: - name: hm-basic-webapp - version: 3.10.0 + version: 3.10.1 repository: file://../../../hm-basic-webapp From fdad00a5563410983e3a97b56bc62f5769f5d942 Mon Sep 17 00:00:00 2001 From: Diogo Scudelletti Date: Tue, 24 Sep 2024 08:49:54 +0200 Subject: [PATCH 4/4] Update example tags --- examples/sample-app/helm-web/values.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/sample-app/helm-web/values.yaml b/examples/sample-app/helm-web/values.yaml index 2090394..e0265d7 100644 --- a/examples/sample-app/helm-web/values.yaml +++ b/examples/sample-app/helm-web/values.yaml @@ -15,8 +15,8 @@ hm-basic-webapp: replicas: 1 ci: - deploymentTag: foo - deploymentMigrationTag: bar + deploymentTag: web + deploymentMigrationTag: migration ingress: enabled: false @@ -42,7 +42,7 @@ hm-basic-webapp: migration: enabled: true image: - repository: sample-migration + repository: sample-app command: - ruby - migration.rb