wip: currently rewriting the project as a full stack application tangled.org/kacaii.dev/sigo
gleam

:truck: move docker tasks to its own file

+43 -40
+2 -40
Taskfile.yml
··· 1 1 version: "3" 2 2 3 - vars: 4 - USERNAME: kacaii 5 - IMAGE_NAME: senac-brigade-server 6 - TAG_NAME: latest 7 - FULL_IMAGE_NAME: "{{.USERNAME}}/{{.IMAGE_NAME}}:{{.TAG_NAME}}" 8 - PORT: 8000 3 + includes: 4 + docker: ./taskfiles/DockerTasks.yml 9 5 10 6 tasks: 11 7 default: 12 8 desc:  List available tasks 13 9 cmd: task --list-all 14 10 silent: true 15 - 16 - docker:run: 17 - desc:  Run the container 18 - cmd: > 19 - docker run 20 - -e DATABASE_URL=$DATABASE_URL 21 - -e COOKIE_TOKEN=$COOKIE_TOKEN 22 - -e ADMIN_TOKEN=$ADMIN_TOKEN 23 - -p {{.PORT}}:{{.PORT}} 24 - {{.IMAGE_NAME}}:{{.TAG_NAME}} 25 - 26 - docker:shipment: 27 - desc:  Build, Tag and Push your app 28 - cmds: 29 - - task: docker:build-image 30 - - task: docker:tag-image 31 - - task: docker:push-image 32 - 33 - # Docker Internal Tasks ------------------------------------------------------ 34 - 35 - docker:build-image: 36 - internal: true 37 - desc:  Build Docker image 38 - cmd: docker-buildx build --file dockerfile --tag {{.IMAGE_NAME}} . 39 - 40 - docker:tag-image: 41 - internal: true 42 - desc:  Tag container image 43 - cmd: docker tag {{.IMAGE_NAME}}:{{.TAG_NAME}} {{.FULL_IMAGE_NAME}} 44 - 45 - docker:push-image: 46 - internal: true 47 - desc:  Push to container registry 48 - cmd: docker push {{.FULL_IMAGE_NAME}}
+41
taskfiles/DockerTasks.yml
··· 1 + version: "3" 2 + 3 + vars: 4 + USERNAME: kacaii 5 + IMAGE_NAME: senac-brigade-server 6 + TAG_NAME: latest 7 + FULL_IMAGE_NAME: "{{.USERNAME}}/{{.IMAGE_NAME}}:{{.TAG_NAME}}" 8 + PORT: 8000 9 + 10 + tasks: 11 + run: 12 + desc:  Run the container 13 + cmd: > 14 + docker run 15 + -e DATABASE_URL=$DATABASE_URL 16 + -e COOKIE_TOKEN=$COOKIE_TOKEN 17 + -e ADMIN_TOKEN=$ADMIN_TOKEN 18 + -p {{.PORT}}:{{.PORT}} 19 + {{.IMAGE_NAME}}:{{.TAG_NAME}} 20 + 21 + shipment: 22 + desc:  Build, Tag and Push your app 23 + cmds: 24 + - task: build-image 25 + - task: tag-image 26 + - task: push-image 27 + 28 + build-image: 29 + internal: true 30 + desc:  Build Docker image 31 + cmd: docker-buildx build --file dockerfile --tag {{.IMAGE_NAME}} . 32 + 33 + tag-image: 34 + internal: true 35 + desc:  Tag container image 36 + cmd: docker tag {{.IMAGE_NAME}}:{{.TAG_NAME}} {{.FULL_IMAGE_NAME}} 37 + 38 + push-image: 39 + internal: true 40 + desc:  Push to container registry 41 + cmd: docker push {{.FULL_IMAGE_NAME}}