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: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ __pycache__/
htmlcov/

# Backend temporary files
backend/example/state
backend/.settings/state
1 change: 1 addition & 0 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ tasks:
project_name='Github Watcher'
project_slug='github-watcher'
node_version='v21.5.0'
github_workflow_runs_on='ubuntu-latest'
owner_name='Dmitry Ovsiannikov'
owner_github_login='ovsds'
scripts='true'
Expand Down
2 changes: 1 addition & 1 deletion backend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ __pycache__/
htmlcov/

# Local app state
example/state
.settings/state
File renamed without changes.
5 changes: 3 additions & 2 deletions backend/example/settings.yaml → backend/.settings/dev.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
app:
env: development
debug: true
logs:
level: DEBUG
tasks:
config_backend:
type: yaml_file
path: example/config.yaml
path: .settings/config.yaml
queue_backend:
type: memory
state_backend:
type: local_dir
path: example/state
path: .settings/state
Empty file added backend/.settings/test.yaml
Empty file.
12 changes: 8 additions & 4 deletions backend/Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ vars:
sh: find {{.SOURCE_FOLDERS}} -name '*.py' | tr '\n' ' '

DEFAULT_IMAGE_NAME: "github-watcher"
SETTINGS_FOLDER: "{{.TASKFILE_DIR}}/.settings"

env:
GITHUB_WATCHER_SETTINGS_YAML: example/settings.yaml
GITHUB_WATCHER_SETTINGS_YAML: "{{.SETTINGS_FOLDER}}/dev.yaml"
GITHUB_WATCHER_SETTINGS_TEST_YAML: "{{.SETTINGS_FOLDER}}/test.yaml"

tasks:
_python:
Expand Down Expand Up @@ -124,8 +126,9 @@ tasks:
- echo 'Running image {{.TARGET}} target...'
- docker run
--env-file <( env| cut -f1 -d= )
--env GITHUB_WATCHER_SETTINGS_YAML=example/settings.yaml
--volume $(pwd)/example:/opt/app/example
--volume {{.SETTINGS_FOLDER}}:/opt/app/.settings
--env GITHUB_WATCHER_SETTINGS_YAML="/opt/app/.settings/dev.yaml"
--env GITHUB_WATCHER_SETTINGS_TEST_YAML="/opt/app/.settings/test.yaml"
{{.DEFAULT_IMAGE_NAME}}:{{.TARGET}}

image-scan:
Expand Down Expand Up @@ -223,7 +226,8 @@ tasks:
- task: image-bake
vars: { TARGET: runtime_dev }
- task: image-run
vars: { TARGET: runtime }
vars:
TARGET: runtime

update-from-template:
desc: Update project from template
Expand Down