Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
222 commits
Select commit Hold shift + click to select a range
d21d837
Recreate worker as a .NET Core app
Jun 11, 2016
7b75c91
Merge pull request #18 from natemcmaster/dotnet
bfirsh Jun 13, 2016
5d5a3e6
Run flask server multithreaded
bfirsh Jun 17, 2016
174d551
Fix percentage recalculation when both votes are zero
aanand Jun 9, 2016
5c20496
Extract vote collection function
aanand Jun 9, 2016
76561de
Always show total vote count
aanand Jun 9, 2016
316da59
adding CI test for Docker Cloud
Jun 16, 2016
c3837fd
adding dockercloud.yml
Jun 16, 2016
f3cf45c
fixing bug in dockercloud.yml
Jun 16, 2016
c754127
Merge pull request #20 from bfirsh/add-ci-test-for-docker-cloud
bfirsh Jun 18, 2016
9244900
Merge pull request #19 from bfirsh/vote-refactoring
bfirsh Jun 18, 2016
2717323
Add Node debugging
bfirsh Jun 18, 2016
d2803ce
Update readme
bfirsh Jun 15, 2016
c3cb729
Architecture diagram
aanand Jun 15, 2016
56feafe
Increase size of "processed by" text
bfirsh Jun 17, 2016
c3ce13e
Set redis socket timeout to 5s
bfirsh Jun 18, 2016
9f0bd82
Use gunicorn for voting app in prod
bfirsh Jun 18, 2016
1523585
Rename services to remove "app"
bfirsh Jun 18, 2016
9c6f5db
Merge pull request #21 from bfirsh/rename-services
bfirsh Jun 18, 2016
a6c0bd3
Fix image names in dockercloud.yml
bfirsh Jun 18, 2016
2c9e704
Put gunicorn command in list
bfirsh Jun 18, 2016
794bccc
Fix race condition in worker
aanand Jun 18, 2016
f3632fe
Merge pull request #22 from docker/fix-worker-race-condition
bfirsh Jun 18, 2016
c0c9ca1
Relax result test
aanand Jun 19, 2016
6f8f341
Update architecture diagram
aanand Jun 19, 2016
b3a3d6e
Reword connection retry messages
aanand Jun 20, 2016
c7d5679
Replace Java with .NET
h0tbird Jun 29, 2016
022cb87
Restore Java worker
aanand Jun 30, 2016
bbc40fa
Reword connection retry messages
aanand Jun 30, 2016
61d480c
Merge pull request #23 from h0tbird/amend_readme
bfirsh Aug 15, 2016
10faf23
Updating Worker Dockerfile
Sep 22, 2016
32caf36
Merge pull request #36 from ManoMarks/master
bfirsh Sep 23, 2016
90e53ad
Revert "Updating Worker Dockerfile"
bfirsh Sep 26, 2016
46f3b7e
Merge pull request #37 from docker/revert-36-master
bfirsh Sep 26, 2016
d133b8e
moved docker-compose.yml to docker-compose-simple.yml and restored ol…
ManoMarks Oct 11, 2016
0612f9a
Merge pull request #40 from ManoMarks/master
bfirsh Oct 19, 2016
f7acb43
Add Mano as a maintainer
bfirsh Oct 20, 2016
46357d5
Merge pull request #42 from bfirsh/add-mano-as-maintainer
bfirsh Oct 24, 2016
34975d1
updating .NET to current version 1.0.0 in Dockerfile and in code
ManoMarks Oct 31, 2016
f06ac96
Labels changes according to options
mohan08p Nov 3, 2016
6a32f44
Merge pull request #45 from mohan08p/resultapp
Nov 3, 2016
af98ddd
Revert "Labels changes according to options"
bfirsh Nov 10, 2016
c5b1bd0
Merge pull request #47 from docker/revert-45-resultapp
bfirsh Nov 10, 2016
1e6eb6a
Merge pull request #44 from ManoMarks/master
Nov 15, 2016
3dd2b2d
Java and .NET Workers can co-exist
ManoMarks Nov 15, 2016
5128584
Merge pull request #50 from ManoMarks/aanand-restore-java-worker
Nov 15, 2016
7b6a497
Establishe redis connection after its lost after a few minutes
mbelsakACN Nov 30, 2016
f1243fc
added connection pooling to postgres to prevent client timeouts
Dec 12, 2016
10c2f9a
Merge pull request #54 from spara/connection_pooling
Dec 12, 2016
418bdf4
Revert "added connection pooling to postgres to prevent client timeouts"
Dec 27, 2016
31fe442
Merge pull request #56 from docker/revert-54-connection_pooling
Dec 27, 2016
c6f58a9
adding docker-stack.yml
ManoMarks Jan 9, 2017
3b8d31a
changing docker-stack.yml to more closely match the rest of the app, …
ManoMarks Jan 9, 2017
a7d95d3
adding a line where one was missing
ManoMarks Jan 9, 2017
9c86aff
adding before tag to vote and result images
ManoMarks Jan 11, 2017
3dfebe3
updating to use dockersamples/visualizer:stable instead of manomarks/…
ManoMarks Jan 11, 2017
e7682e2
adding placement restraint to add visualizer, must run on a manager
ManoMarks Jan 14, 2017
36dec3f
Fix docker-compose-javawork.yml
ggtools Jan 15, 2017
3fbba26
Merge pull request #58 from ManoMarks/stack
Jan 18, 2017
d57cb32
note about one vote per client
Jan 20, 2017
d4c5f87
Merge pull request #60 from docker/duplicate_key
Jan 20, 2017
ff76a33
Merge pull request #57 from ggtools/patch-1
Jan 20, 2017
f6d60bf
Merge pull request #51 from mbelsak/master
Jan 21, 2017
412c3f5
updating compose files to v3
ManoMarks Jan 24, 2017
65e523b
Updating README to include stack deploy instructions
ManoMarks Jan 24, 2017
3c72629
Updating title of app
ManoMarks Jan 24, 2017
c60e376
Merge pull request #61 from ManoMarks/master
spara Jan 24, 2017
773caf6
adding a placement constraint on visualizer so it runs on a manager node
ManoMarks Jan 25, 2017
5bdfd3f
Merge pull request #62 from ManoMarks/master
spara Jan 25, 2017
3cc28f3
Update replicas to 1 in result service
marcosnils Jan 31, 2017
b138c17
Merge pull request #67 from marcosnils/patch-2
Jan 31, 2017
d915241
updating to latest version of dotnet
ManoMarks Apr 7, 2017
560ad11
Merge pull request #78 from ManoMarks/master
Apr 7, 2017
3e91d1f
Create ISSUE_TEMPLATE
May 4, 2017
a51cd17
Update ISSUE_TEMPLATE
May 4, 2017
9c4dc53
Update docker-stack.yml
Jul 21, 2017
bc6675e
fix start-up order, depend worker on redis in docker-compose.yml
ikisusi Oct 1, 2017
44c3eac
Don't lose Redis connection on reconnect
oherrala Oct 1, 2017
176d4c6
FEATURED: .NET 2.0.0 SDK for Worker
ubinix-warun Oct 2, 2017
50fc41c
prevent dotnet worker from consuming all cpu
BretFisher Nov 21, 2017
128d1a3
updating node versions and fixing result tests
BretFisher Nov 21, 2017
dff6eed
updating node versions and fixing result tests
BretFisher Nov 21, 2017
d2e2e40
Merge pull request #93 from BretFisher/result-test-fix-and-node-update
Nov 21, 2017
945dfd6
Merge branch 'master' into master
Nov 21, 2017
e39a11e
Merge branch 'master' into master
Nov 21, 2017
668efb3
Merge pull request #92 from BretFisher/master
Nov 21, 2017
27a6395
Merge pull request #90 from ubinix-warun/master
Nov 21, 2017
aaa3415
removing --debug flag from nodemon
ManoMarks Nov 29, 2017
dfaeb9b
Merge pull request #95 from ManoMarks/master
Nov 29, 2017
8685410
adding warning about switching to Linux containers
ManoMarks Nov 29, 2017
a8896bf
Merge pull request #96 from ManoMarks/master
Nov 29, 2017
51dabd3
Merge pull request #87 from ikisusi/startup-order
Nov 29, 2017
34970d3
Merge pull request #89 from oherrala/redisconn
Nov 29, 2017
7fadd0e
tests: please shellcheck
akimd Dec 14, 2017
e6c7498
Merge pull request #98 from akimd/shellcheck
Dec 14, 2017
533f7f0
Fix javaworker result service not starting
thaJeztah Jan 4, 2018
f284a4f
Optimize result image
thaJeztah Jan 4, 2018
7232833
Optimize java-worker image
thaJeztah Jan 4, 2018
1269b6b
Merge pull request #102 from thaJeztah/improve-java-worker
Jan 4, 2018
baa18ec
Merge pull request #101 from thaJeztah/improve-result-dockerfile
Jan 4, 2018
f0d6dff
Merge pull request #100 from thaJeztah/fix-javaworker-result
Jan 4, 2018
9e0a8b9
missing path module and console.err -> console.error
Jan 6, 2018
f1abc11
Merge pull request #104 from gabrielvv/master
Feb 1, 2018
1b9daff
Add k8s specfications
lucj Mar 5, 2018
dd72ddd
Merge pull request #107 from lucj/master
Mar 20, 2018
7372511
Fix typo in the comment
rf-sys Jul 17, 2018
040692c
Merge pull request #115 from salvatoris/patch-1
Jul 17, 2018
b04febe
updated .gitignore
Jul 30, 2018
24a9449
added Jenkinsfile
Jul 30, 2018
9f48680
Update Jenkinsfile
Aug 16, 2018
3907de8
Merge pull request #117 from dave-tucker/jenkinsfile
Aug 17, 2018
24bc3a0
adding simple stack file for getting started
Sep 20, 2018
5a6cb91
Merge pull request #121 from ManoMarks/master
Sep 20, 2018
1360052
Add .NET Core 2.1 versions
sixeyed Sep 21, 2018
2dafa8a
Results site in .NET Core
sixeyed Sep 26, 2018
8270c22
Add MySql result loader
sixeyed Sep 26, 2018
786a5b9
Fix initial load
sixeyed Sep 26, 2018
71adc92
Add config from environment variables
sixeyed Sep 26, 2018
b7bbf76
Pin to Nano Server SAC 2016 images
sixeyed Sep 26, 2018
2bd7e34
Merge remote-tracking branch 'upstream/master'
sixeyed Sep 26, 2018
fec8297
Document Windows options
sixeyed Sep 26, 2018
75af246
Merge pull request #122 from sixeyed/master
Sep 26, 2018
35aed96
Add namespace to k8s deployments and services
lucj Oct 9, 2018
f6d73b8
Merge pull request #123 from lucj/master
Oct 10, 2018
305674a
Add instruction to add namespace
lucj Oct 10, 2018
bf9f1b8
Add Windows 1809 support
sixeyed Oct 22, 2018
4e0a1e0
Merge pull request #125 from sixeyed/master
Oct 22, 2018
b28e02e
Merge pull request #124 from lucj/master
Oct 25, 2018
f40d0ce
Remove published swarm stack redis port
BretFisher Oct 29, 2018
390c7ee
Delete dockercloud.yml
BretFisher Oct 29, 2018
5906ff6
Merge pull request #128 from BretFisher/patch-1
Oct 29, 2018
04f4288
Merge pull request #129 from BretFisher/patch-2
Oct 29, 2018
6d2b645
Fix typo in markdown
spuder Oct 31, 2018
b1bb8d2
Merge pull request #131 from spuder/patch-1
Nov 1, 2018
5f30fc4
ignore node_modules in git and docker build
BretFisher Aug 25, 2019
132f03b
change result to use local angular
BretFisher Aug 25, 2019
5dcf367
update result to node 10 and latest npm packages
BretFisher Aug 25, 2019
52adcf2
fix worker depends_on
BretFisher Aug 25, 2019
683dd0c
Changes to node slim to fix Jenkins PR build
BretFisher Aug 25, 2019
014f07a
update to app/v1 and yaml parity
BretFisher Aug 26, 2019
37958b5
Merge pull request #144 from BretFisher/update-kube-deployments
jrburcio Aug 27, 2019
8a64ab8
Merge pull request #141 from BretFisher/fix-worker-depends-on
jrburcio Aug 27, 2019
27f901b
Merge pull request #140 from BretFisher/update-result-deps
jrburcio Aug 27, 2019
227733f
Merge pull request #139 from BretFisher/ignore-node-modules
jrburcio Aug 27, 2019
518c6a4
Update images for Windows 1809
sixeyed Aug 29, 2019
3953233
Update to .NET Core 2.1 & pin images
sixeyed Aug 29, 2019
52b93bb
Incorrect label for worker Deployment in .spec.selector.matchLabels
lucj Sep 10, 2019
d12d6a2
Merge pull request #146 from lucj/master
jrburcio Sep 10, 2019
d4a0599
Add missing vote namespace
Nov 13, 2019
802fee5
Set an explicit username and password for the db service
Feb 16, 2020
396b1a0
Set an explicit username/password for Postgres in the other Compose f…
Feb 19, 2020
be1f873
Set an explicit username/password for Postgres in the swarm and k8s f…
Feb 19, 2020
4654cac
Merge pull request #159 from shipyardbuild/fix-postgres-init
jrburcio Feb 19, 2020
a6cf19e
Version Was invalid, Fix to Version3 docker-compose
DanArlowski Nov 4, 2020
23da8ee
Update readme
schollii Dec 14, 2020
89bcdef
Merge pull request #191 from schollii/patch-1
BretFisher Dec 14, 2020
2450548
Merge pull request #145 from sixeyed/master
BretFisher Dec 14, 2020
a5e62a5
Bump socket.io from 2.2.0 to 2.4.0 in /result
dependabot[bot] Jan 21, 2021
cc9e5cf
Merge pull request #186 from DanArlowski/patch-1
BretFisher Jan 29, 2021
c33f2ab
Merge pull request #152 from pocteo/feature/add_vote_namespace
BretFisher Jan 29, 2021
333a29a
Merge pull request #194 from dockersamples/dependabot/npm_and_yarn/re…
BretFisher Jan 29, 2021
1afcb8b
update deps, add tini and curl, use COPY not ADD
BretFisher Jan 29, 2021
83f0c4d
healthchecks! move to compose spec version!
BretFisher Jan 29, 2021
9990c9a
added new maintainers!
BretFisher Jan 29, 2021
efe68fd
added vote logging
BretFisher Jan 29, 2021
84877fe
adding data seeding
BretFisher Jan 29, 2021
173fca9
remove unused Jenkins
BretFisher Jan 29, 2021
b4f8369
Update dotnet 3.1
StefanScherer Feb 12, 2021
8cc2723
Update TargetFramework to 3.1
StefanScherer May 5, 2021
23dc611
Merge pull request #197 from StefanScherer/update-dotnet-3-1
justincormack May 5, 2021
6779e6e
Update README.md
Alirezaaraby Jul 25, 2022
1465f2e
Merge pull request #243 from Alirezaaraby/master
mikesir87 Nov 29, 2022
cfd77a8
docker build gha init
BretFisher Dec 3, 2022
e045b59
disable Hub until bot account works
BretFisher Dec 3, 2022
30248b4
Fix the case of losing a vote when actual vote found in Redis and db …
ErjanGavalji Dec 8, 2022
881380f
updating GHA paths
BretFisher Dec 9, 2022
68cd335
enable docker hub
BretFisher Dec 9, 2022
dda0385
disable worker arm/v7 support for now
BretFisher Dec 9, 2022
97e7229
Merge pull request #266 from ErjanGavalji/main
mikesir87 Dec 9, 2022
30845ba
update result node.js deps for multi-arch
BretFisher Dec 9, 2022
10391fc
Merge pull request #268 from dockersamples/update-result-deps
mikesir87 Dec 16, 2022
38c6d2d
Merge branch 'main' into gha-init
BretFisher Dec 16, 2022
fe39897
Merge pull request #263 from dockersamples/gha-init
mikesir87 Dec 16, 2022
20d50f4
Clean up worker service (#272)
mikesir87 Dec 16, 2022
f1d2767
Adding docker hub to push list (#271)
BretFisher Dec 16, 2022
94c49c7
compose and K8s file cleanup (#273)
BretFisher Dec 17, 2022
58d3295
fix dotnet build (#274)
BretFisher Dec 17, 2022
d77c8e6
Remove namespace from k8s example (#275)
BretFisher Dec 17, 2022
857aae7
add before and after tags for demos (#276)
BretFisher Dec 17, 2022
5b3540a
remove dupe dotnet voting and result apps (#277)
BretFisher Dec 17, 2022
6a7a820
remove redis port (#278)
BretFisher Dec 17, 2022
96a4f46
updated architecture diag (#286)
BretFisher Feb 23, 2023
303daf2
Adding a git attributes file to avoid EOL issues
Apr 6, 2023
2d554e2
Update vote service to python:3.11
mikesir87 Sep 18, 2023
907eadf
Update result libs to latest versions & resolve socket.io CVE
mikesir87 Sep 18, 2023
2fa95ff
Simplify .NET multi-platform Dockerfile (#301)
lbussell Oct 18, 2023
bd6b2bc
Add debug port support for the results (node) app
mikesir87 Oct 19, 2023
350e415
Merge pull request #307 from dockersamples/update-versions
mikesir87 Oct 24, 2023
a6a4b1c
Merge pull request #308 from dockersamples/add-node-debugger-support
mikesir87 Oct 24, 2023
2d6b1fd
Don't break on user script at start and bind debug only locally
mikesir87 Oct 24, 2023
e8547fa
Merge pull request #310 from dockersamples/adjust-inspect
mikesir87 Oct 24, 2023
40aa3fa
Fix file mounts (work dir change) and python reloading
mikesir87 Oct 27, 2023
289c9ee
Merge pull request #311 from dockersamples/fix-python-reloading
mikesir87 Oct 27, 2023
7b7d9b4
Adjust name of debug launch config
mikesir87 Nov 2, 2023
f0b2088
Merge pull request #292 from julienadam/main
mikesir87 Sep 20, 2024
788c572
lint: fix LegacyKeyValueFormat
dvdksn Oct 10, 2024
1409966
lint: fix FromAsCasing
dvdksn Oct 10, 2024
e05632f
lint: fix JSONArgsRecommended
dvdksn Oct 10, 2024
d304075
lint: fix InvalidDefinitionDescription
dvdksn Oct 10, 2024
c2242d4
Merge pull request #379 from dvdksn/example-voting-app-fixups
mikesir87 Oct 10, 2024
104c1ae
Change ports of vote/result ports from 5000/5001 to 8080/8081
mikesir87 Oct 10, 2024
62017f0
Merge pull request #380 from dockersamples/change-ports
mikesir87 Oct 10, 2024
23fdbe7
add multi- stage dockerfiles with health checks
Jun 17, 2026
1dd9296
remove terraform provider binaries from git
Jun 17, 2026
db470c3
add voting app cicd pipeline
Jun 17, 2026
4d2029e
Add CI/CD workflow for Voting App deployment
ruchira2424 Jun 17, 2026
f087546
trigger pipeline
Jun 17, 2026
fc51efb
Update deploy.yml
ruchira2424 Jun 17, 2026
0df3da5
Refactor CI/CD workflow for Voting App
ruchira2424 Jun 17, 2026
a7a6421
Update deploy.yml
ruchira2424 Jun 17, 2026
5823087
Update deploy.yml
ruchira2424 Jun 17, 2026
6aa80ab
Update deploy.yml
ruchira2424 Jun 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Set default behavior to automatically normalize line endings.
* text=auto

# Force batch scripts to always use CRLF line endings so that if a repo is accessed
# in Windows via a file share from Linux, the scripts will work.
*.{cmd,[cC][mM][dD]} text eol=crlf
*.{bat,[bB][aA][tT]} text eol=crlf
*.{ics,[iI][cC][sS]} text eol=crlf

# Force bash scripts to always use LF line endings so that if a repo is accessed
# in Unix via a file share from Windows, the scripts will work.
*.sh text eol=lf
40 changes: 40 additions & 0 deletions .github/ISSUE_TEMPLATE
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
** PLEASE ONLY USE THIS ISSUE TRACKER TO SUBMIT ISSUES WITH THE EXAMPLE VOTING APP **

* If you have a bug working with Docker itself, not related to these labs, please file the bug on the [Docker repo](https://github.com/docker/docker) *
* If you would like general support figuring out how to do something with Docker, please use the Docker Slack channel. If you're not on that channel, sign up for the [Docker Community](http://dockr.ly/MeetUp) and you'll get an invite. *
* Or go to the [Docker Forums](https://forums.docker.com/) *

Please provide the following information so we can assess the issue you're having

**Description**

<!--
Briefly describe the problem you are having in a few paragraphs.
-->

**Steps to reproduce the issue, if relevant:**
1.
2.
3.

**Describe the results you received:**


**Describe the results you expected:**


**Additional information you deem important (e.g. issue happens only occasionally):**

**Output of `docker version`:**

```
(paste your output here)
```

**Output of `docker info`:**

```
(paste your output here)
```

**Additional environment details (AWS, Docker for Mac, Docker for Windows, VirtualBox, physical, etc.):**
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
82 changes: 82 additions & 0 deletions .github/workflows/call-docker-build-result.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Build Result
# template source: https://github.com/dockersamples/.github/blob/main/templates/call-docker-build.yaml

on:
# we want pull requests so we can build(test) but not push to image registry
push:
branches:
- 'main'
# only build when important files change
paths:
- 'result/**'
- '.github/workflows/call-docker-build-result.yaml'
pull_request:
branches:
- 'main'
# only build when important files change
paths:
- 'result/**'
- '.github/workflows/call-docker-build-result.yaml'

jobs:
call-docker-build:

name: Result Call Docker Build

uses: dockersamples/.github/.github/workflows/reusable-docker-build.yaml@main

permissions:
contents: read
packages: write # needed to push docker image to ghcr.io
pull-requests: write # needed to create and update comments in PRs

secrets:

# Only needed if with:dockerhub-enable is true below
dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }}

# Only needed if with:dockerhub-enable is true below
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}

with:

### REQUIRED
### ENABLE ONE OR BOTH REGISTRIES
### tell docker where to push.
### NOTE if Docker Hub is set to true, you must set secrets above and also add account/repo/tags below
dockerhub-enable: true
ghcr-enable: true

### REQUIRED
### A list of the account/repo names for docker build. List should match what's enabled above
### defaults to:
image-names: |
ghcr.io/dockersamples/example-voting-app-result
dockersamples/examplevotingapp_result

### REQUIRED set rules for tagging images, based on special action syntax:
### https://github.com/docker/metadata-action#tags-input
### defaults to:
tag-rules: |
type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
type=raw,value=before,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
type=raw,value=after,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
type=ref,event=pr

### path to where docker should copy files into image
### defaults to root of repository (.)
context: result

### Dockerfile alternate name. Default is Dockerfile (relative to context path)
# file: Containerfile

### build stage to target, defaults to empty, which builds to last stage in Dockerfile
# target:

### platforms to build for, defaults to linux/amd64
### other options: linux/amd64,linux/arm64,linux/arm/v7
platforms: linux/amd64,linux/arm64,linux/arm/v7

### Create a PR comment with image tags and labels
### defaults to false
# comment-enable: false
82 changes: 82 additions & 0 deletions .github/workflows/call-docker-build-vote.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Build Vote
# template source: https://github.com/dockersamples/.github/blob/main/templates/call-docker-build.yaml

on:
# we want pull requests so we can build(test) but not push to image registry
push:
branches:
- 'main'
# only build when important files change
paths:
- 'vote/**'
- '.github/workflows/call-docker-build-vote.yaml'
pull_request:
branches:
- 'main'
# only build when important files change
paths:
- 'vote/**'
- '.github/workflows/call-docker-build-vote.yaml'

jobs:
call-docker-build:

name: Vote Call Docker Build

uses: dockersamples/.github/.github/workflows/reusable-docker-build.yaml@main

permissions:
contents: read
packages: write # needed to push docker image to ghcr.io
pull-requests: write # needed to create and update comments in PRs

secrets:

# Only needed if with:dockerhub-enable is true below
dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }}

# Only needed if with:dockerhub-enable is true below
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}

with:

### REQUIRED
### ENABLE ONE OR BOTH REGISTRIES
### tell docker where to push.
### NOTE if Docker Hub is set to true, you must set secrets above and also add account/repo/tags below
dockerhub-enable: true
ghcr-enable: true

### REQUIRED
### A list of the account/repo names for docker build. List should match what's enabled above
### defaults to:
image-names: |
ghcr.io/dockersamples/example-voting-app-vote
dockersamples/examplevotingapp_vote

### REQUIRED set rules for tagging images, based on special action syntax:
### https://github.com/docker/metadata-action#tags-input
### defaults to:
tag-rules: |
type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
type=raw,value=before,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
type=raw,value=after,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
type=ref,event=pr

### path to where docker should copy files into image
### defaults to root of repository (.)
context: vote

### Dockerfile alternate name. Default is Dockerfile (relative to context path)
# file: Containerfile

### build stage to target, defaults to empty, which builds to last stage in Dockerfile
# target:

### platforms to build for, defaults to linux/amd64
### other options: linux/amd64,linux/arm64,linux/arm/v7
platforms: linux/amd64,linux/arm64,linux/arm/v7

### Create a PR comment with image tags and labels
### defaults to false
# comment-enable: false
82 changes: 82 additions & 0 deletions .github/workflows/call-docker-build-worker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Build Worker
# template source: https://github.com/dockersamples/.github/blob/main/templates/call-docker-build.yaml

on:
# we want pull requests so we can build(test) but not push to image registry
push:
branches:
- 'main'
# only build when important files change
paths:
- 'worker/**'
- '.github/workflows/call-docker-build-worker.yaml'
pull_request:
branches:
- 'main'
# only build when important files change
paths:
- 'worker/**'
- '.github/workflows/call-docker-build-worker.yaml'

jobs:
call-docker-build:

name: Worker Call Docker Build

uses: dockersamples/.github/.github/workflows/reusable-docker-build.yaml@main

permissions:
contents: read
packages: write # needed to push docker image to ghcr.io
pull-requests: write # needed to create and update comments in PRs

secrets:

# Only needed if with:dockerhub-enable is true below
dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }}

# Only needed if with:dockerhub-enable is true below
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}

with:

### REQUIRED
### ENABLE ONE OR BOTH REGISTRIES
### tell docker where to push.
### NOTE if Docker Hub is set to true, you must set secrets above and also add account/repo/tags below
dockerhub-enable: true
ghcr-enable: true

### REQUIRED
### A list of the account/repo names for docker build. List should match what's enabled above
### defaults to:
image-names: |
ghcr.io/dockersamples/example-voting-app-worker
dockersamples/examplevotingapp_worker

### REQUIRED set rules for tagging images, based on special action syntax:
### https://github.com/docker/metadata-action#tags-input
### defaults to:
tag-rules: |
type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
type=ref,event=pr

### path to where docker should copy files into image
### defaults to root of repository (.)
context: worker

### Dockerfile alternate name. Default is Dockerfile (relative to context path)
# file: Containerfile

### build stage to target, defaults to empty, which builds to last stage in Dockerfile
# target:

### platforms to build for, defaults to linux/amd64
### other options: linux/amd64,linux/arm64,linux/arm/v7
# FIXME worker arm/v7 support doesn't build in .net core 3.1 with QEMU
# a fix would likely run the .net build on amd64 but with a target of arm/v7
platforms: linux/amd64,linux/arm64,linux/arm/v7

### Create a PR comment with image tags and labels
### defaults to false
# comment-enable: false
Loading