Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

* [PR-4](https://github.com/itk-dev/rpa-process-overview/pull/4)
Added and used `rsync` inside docker service
* [PR-3](https://github.com/itk-dev/rpa-process-overview/pull/3)
Mocked API with FastAPI and friends.
* [PR-2](https://github.com/rimi-itk/rpa-process-overview/pull/2)
Expand Down
18 changes: 13 additions & 5 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,21 @@ tasks:
build:widgets:
desc: Build widgets for production and copy to public folder
cmds:
- task widgets:build
- task: widgets:build

# Copy result into public folder
- rm -fr {{.PUBLIC_DIR}}
# rsync is weird when it comes to including and excluding files …
- rsync -azv {{.BUILD_DIR}} --include '*/' --include '**/*.css' --include '**/*.js' --exclude '*' --delete {{.PUBLIC_DIR}}
- find {{.PUBLIC_DIR}} -type f
- task: compose
vars:
TASK_ARGS: exec phpfpm rm -fr {{.PUBLIC_DIR}}
- task: compose
vars:
# rsync is weird when it comes to including and excluding files …
# https://stackoverflow.com/a/11111793
TASK_ARGS: exec phpfpm rsync -azv {{.BUILD_DIR}} --include '*/' --include '**/*.css' --include '**/*.js' --exclude '*' --delete {{.PUBLIC_DIR}}
- task: compose
vars:
TASK_ARGS: exec phpfpm find {{.PUBLIC_DIR}} -type f

vars:
BUILD_DIR: widgets/static/dist/
PUBLIC_DIR: public/widgets
Expand Down
10 changes: 10 additions & 0 deletions docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ include:
services:
phpfpm:
image: itkdev/php8.4-fpm:latest
build:
# We need rsync to copy built widget files.
dockerfile_inline: |
FROM itkdev/php8.4-fpm:latest

USER root
RUN apt-get update && \
apt-get --yes install rsync

USER deploy

nginx:
ports: !override
Expand Down
Loading