spiff-arena/docker-compose.yml

102 lines
4.1 KiB
YAML
Raw Normal View History

# Why we are running with network_mode: host
# Wow this has been awful. We run three things in docker: mysql, keycloak, and the backend server.
# The backend-server needs to talk to the other two.
#
# In order to talk to keycloak, it needs to go through localhost so that it can communicate with
# keycloak using the same url as the frontend so that tokens can be properly validated.
# If the domains are different, keycloak invalidates the token. There may be a way to change
# this but I didn't find it.
#
# In order for the backend server to talk to the mysql server, they need to be on the same network.
# I tried splitting it out where the mysql runs on a custom network and the backend runs on both
# the custom network AND with localhost. Nothing I tried worked and googling didn't help. They
# only ever mentioned one thing or using host.docker.internal which would cause the domains to
# be different.
#
# So instead we are running with both the mysql server and the backend server in host netowrk mode.
# There may be a better way to do this but if it works, then it works.
version: "3.8"
services:
db:
container_name: db
image: mysql:8.0.29
platform: linux/amd64
cap_add:
- SYS_NICE
restart: "${SPIFFWORKFLOW_BACKEND_DATABASE_DOCKER_RESTART_POLICY:-no}"
environment:
- MYSQL_DATABASE=${SPIFFWORKFLOW_BACKEND_DATABASE_NAME:-spiffworkflow_backend_development}
- MYSQL_ROOT_PASSWORD=${SPIFFWORKFLOW_BACKEND_MYSQL_ROOT_DATABASE:-my-secret-pw}
- MYSQL_TCP_PORT=7003
network_mode: host
ports:
- "7003"
volumes:
- spiffworkflow_backend:/var/lib/mysql
healthcheck:
test: mysql --user=root --password=${SPIFFWORKFLOW_BACKEND_MYSQL_ROOT_DATABASE:-my-secret-pw} -e 'select 1' ${SPIFFWORKFLOW_BACKEND_DATABASE_NAME:-spiffworkflow_backend_development}
interval: 10s
timeout: 5s
retries: 10
spiffworkflow-backend: &spiffworkflow-backend
container_name: spiffworkflow-backend
profiles:
- run
depends_on:
db:
condition: service_healthy
build:
context: .
environment:
- APPLICATION_ROOT=/
- SPIFFWORKFLOW_BACKEND_ENV=${SPIFFWORKFLOW_BACKEND_ENV:-development}
- FLASK_DEBUG=0
- FLASK_SESSION_SECRET_KEY=${FLASK_SESSION_SECRET_KEY:-super_secret_key}
Squashed 'spiffworkflow-backend/' changes from 094de3563..031713a61 031713a61 added new test users for status in keycloak w/ burnettk da25a85b7 added script to add test keycloak users and moved all keycloak stuff to keycloak directory w/ burnettk 74c46c9b4 pin SpiffWorkflow to passing version for CI tests w/ burnettk 3bb4c893f Merge pull request #105 from sartography/feature/avoid_logs_when_call_activity_waiting b8d664381 disabled flake8 forcing comments to avoid all of the useless comments but still enforcing the formatting of comments if they exist w/ burnettk 9be85cac6 show start events in logs as well and added bpmn process identifiers to log table w/ burnettk ab5b1f77f downgrade spiff and upgrade some other stuff b51e1ca59 upgrade certifi to fix security vulnerability 65b9005d4 do not allow overwriting process models and process groups w/ burnettk 70b9ce61c added End Event to simple log view w/ burnettk 1c2fe64f1 pyl w/ burnettk 56de0294a skip failing xml test on windows w/ burnettk 31944bd07 use the correct windows path separator in test file 1e070f87c favor user_input_required over waiting status for process instances w/ burnettk 9ced1b90a fixed broken test w/ burnettk 8ae6929d1 only show milestones for simple log view w/ burnettk b98908fa3 do not resolve entities when parsing xml w/ burnettk ecf8acaf5 do not write to logs when a task is inheriting data from the parent w/ burnettk e81d7b8f5 updated open id url for compose ci acf115c5f pyl 8a0982ea9 fixed cypress tests 399a6ac69 postgres does not have group_concat, and it is stricter about getting back columns when grouping c813209c4 Merge pull request #102 from sartography/feature/waku-fault-message 7e5d4d8ce Merge pull request #101 from sartography/task_data_len 4b0ffb17c Merge branch 'main' of github.com:sartography/spiff-arena ef55abb7a fixed broken test w/ burnettk 9608f65ef Skip refresh steps (#103) 20a48e6ef added tasks table to process instance show page w/ burnettk f071832e0 Merge branch 'main' into feature/waku-fault-message 57249528d run_pyl changes 30132ed09 Fixed failing test a0f9d7e39 stop at call activity as well when getting calling subprocesses by child id w/ burnettk e4ebe4544 Getting ./bin/pyl to pass cf0a78aef Merge branch 'main' into task_data_len 48083b164 Bump the limit to 1mb 202ba2e8c Better impl 5bf49c386 reorder imports c53328523 import order c67872354 unused imports d9a9eeae8 Merge branch 'main' into feature/waku-fault-message e98a4540c POC checking cumulative task data len fe5258780 fixed failing test w/ burnettk d00d28d95 added detailed area to process instance show page w/ burnettk 910311832 set the domain for the token cookies w/ burnettk 3cae7055a a little more cleanup w/ burnettk f756453b3 remove several debug print statements 3180353bb logout works now and queryparams are getting passed correctly on login now 0ee732842 pyl a55b14f53 Merge branch 'main' into feature/waku-fault-message e7ab8f8b8 Cleaned up the message text fa299f412 Precommit 999b19062 mypy 6260af4b6 use the cookie from the frontend w/ burnettk 0e50e71db this can run on localhost with cookies w/ burnettk aa626d743 this somewhat works and sets cookies w/ burnettk 4b5d2d611 debugging cookies w/ burnettk 4f04ed716 updated get_token to actually work b31f04a65 Removed test for email error handler. Added stub for testing system handler process 77e4e017a lint w/ burnettk 38951f4d6 only load file references when needed to avoid unnecessary xml errors w/ burnettk 018bd8d1c save a process model file after running all validations w/ burnettk 9c45eedf1 Merge remote-tracking branch 'origin/main' into feature/add_some_xml_validations 5804f058e fixed failing tests 8eb4f1ac9 some updates to validate xml when uploading and saving w/ burnettk 63aad8839 pyl 4120deddb Merge branch 'main' into feature/waku-fault-message 1181d4191 Work on System Notification handler d5fe920af handle subprocesses in navigation b1b694982 call proceses through setProcesses to ensure we have up to date value and removed debug logs w/ burnettk 35fb0e130 attempting to use correct ids vs paths for windows w/ burnettk fc580cbba more debug logs w/ burnettk 874d99580 Merge pull request #96 from sartography/feature/fix_docker_script_in_ci ab81e753c added in debug logging for launching call activity editor w/ burnettk ff73d5b0f fixed typeguard tests w/ burnettk 4792c66a3 fixed typeguard tests w/ burnettk b8dda8779 pyl w/ burnettk c16b59044 fix setting the bpmn dir in start scripts w/ burnettk b70ef1796 Update process_models_controller to include `fault_or_suspend_on_exception` and `exception_notification_addresses` for Process Model create/update 39d374341 also show skipped tasks in the simplified log w/ burnettk 94c6f4ccd some updates to test w/ burnettk 2ebb3a14c do not allow sending messages to terminated and suspended process instances w/ burnettk 4cad37bf3 pyl w/ burnettk 2f1a11cd5 actually filter by process initiator w/ burnettk 9565d8548 Merge branch 'main' of github.com:sartography/spiff-arena f1e399c87 highlight tasks even if they are in subprocesses of called activities w/ burnettk 00049fcc5 ensure we are not accidentally using main 9e4b37e7a updated SpiffWorkflow w/ burnettk git-subtree-dir: spiffworkflow-backend git-subtree-split: 031713a61add3cadf7a608732134dd4f15d34668
2023-01-19 13:44:53 -05:00
- OPEN_ID_SERVER_URL=${OPEN_ID_SERVER_URL:-http://localhost:7002/realms/spiffworkflow}
- SPIFFWORKFLOW_FRONTEND_URL=${SPIFFWORKFLOW_FRONTEND_URL:-http://localhost:7001}
- SPIFFWORKFLOW_BACKEND_URL=${SPIFFWORKFLOW_BACKEND_URL:-http://localhost:7000}
- SPIFFWORKFLOW_BACKEND_PORT=7000
- SPIFFWORKFLOW_BACKEND_UPGRADE_DB=true
- SPIFFWORKFLOW_BACKEND_DATABASE_URI=mysql+mysqlconnector://root:${SPIFFWORKFLOW_BACKEND_MYSQL_ROOT_DATABASE:-my-secret-pw}@localhost:7003/${SPIFFWORKFLOW_BACKEND_DATABASE_NAME:-spiffworkflow_backend_development}
- BPMN_SPEC_ABSOLUTE_DIR=/app/process_models
- SPIFFWORKFLOW_BACKEND_LOAD_FIXTURE_DATA=${SPIFFWORKFLOW_BACKEND_LOAD_FIXTURE_DATA:-false}
- SPIFFWORKFLOW_BACKEND_PERMISSIONS_FILE_NAME=${SPIFFWORKFLOW_BACKEND_PERMISSIONS_FILE_NAME:-acceptance_tests.yml}
- RUN_BACKGROUND_SCHEDULER=true
ports:
- "7000:7000"
network_mode: host
volumes:
Squashed 'spiffworkflow-backend/' changes from ecbe9704..7600e1e5 7600e1e5 added new api endpoint to get task-info so users with access to process instances can see the tasks but not the data 643f632c fix permissions for core on dev w/ burnettk 78badf26 fix broken unit tests in backend 6a9272b3 do not set git branch info on development w/ burnettk cullerton e5b03110 commit and push to github on all changes to bpmn dir w/ burnettk cullerton e33d0030 Merge branch 'main' of github.com:sartography/spiff-arena cf9b2fcb add support to find the form for a call activity defined in another process model 494a427c Fix endpoints for script task unit tests (#77) 6eec41a7 make replacing keycloak more robust, as it now works when the container is running ec01b279 some fixes for ci w/ burnettk 7e520dbc remove assert statements from actual code w/ burnettk 511d31b9 fixed perms for readonly for staging w/ burnettk 900f4524 load the correct perm file on staging w/ burnettk 562ec8ef added permission file for staging w/ burnettk 7e39994c in postgres you cannot order by a non-grouped column without doing an aggregate 36c50953 pyl and fix test w/ burnettk f15794a2 store subprocesses for spiff steps as well and do not save file as primary if one is already set w/ burnettk 395b7e44 Merge remote-tracking branch 'origin/main' into feature/view_call_activity_diagram 4c119caa some fixes to ensure we display the correct task data for the diagram elements w/ burnettk ebbb593e lint 6ae471d0 pyl 5e54256a added test to get the diagram for a given process instance call activity 2c1d8b62 allow viewing the diagram for a specific process identifier b8a5690c strip off spaces from git service command stdout 1291c8d4 try to fix a test on windows git-subtree-dir: spiffworkflow-backend git-subtree-split: 7600e1e57917b3a1b3d07d41daaeddbb09e8242c
2022-12-16 13:23:57 -05:00
- ${BPMN_SPEC_ABSOLUTE_DIR:-../../sample-process-models}:/app/process_models
- ./log:/app/log
healthcheck:
test: curl localhost:7000/v1.0/status --fail
interval: 10s
timeout: 5s
retries: 20
spiffworkflow-backend-local-debug:
<<: *spiffworkflow-backend
container_name: spiffworkflow-backend-local-debug
profiles:
- debug
volumes:
Squashed 'spiffworkflow-backend/' changes from ecbe9704..7600e1e5 7600e1e5 added new api endpoint to get task-info so users with access to process instances can see the tasks but not the data 643f632c fix permissions for core on dev w/ burnettk 78badf26 fix broken unit tests in backend 6a9272b3 do not set git branch info on development w/ burnettk cullerton e5b03110 commit and push to github on all changes to bpmn dir w/ burnettk cullerton e33d0030 Merge branch 'main' of github.com:sartography/spiff-arena cf9b2fcb add support to find the form for a call activity defined in another process model 494a427c Fix endpoints for script task unit tests (#77) 6eec41a7 make replacing keycloak more robust, as it now works when the container is running ec01b279 some fixes for ci w/ burnettk 7e520dbc remove assert statements from actual code w/ burnettk 511d31b9 fixed perms for readonly for staging w/ burnettk 900f4524 load the correct perm file on staging w/ burnettk 562ec8ef added permission file for staging w/ burnettk 7e39994c in postgres you cannot order by a non-grouped column without doing an aggregate 36c50953 pyl and fix test w/ burnettk f15794a2 store subprocesses for spiff steps as well and do not save file as primary if one is already set w/ burnettk 395b7e44 Merge remote-tracking branch 'origin/main' into feature/view_call_activity_diagram 4c119caa some fixes to ensure we display the correct task data for the diagram elements w/ burnettk ebbb593e lint 6ae471d0 pyl 5e54256a added test to get the diagram for a given process instance call activity 2c1d8b62 allow viewing the diagram for a specific process identifier b8a5690c strip off spaces from git service command stdout 1291c8d4 try to fix a test on windows git-subtree-dir: spiffworkflow-backend git-subtree-split: 7600e1e57917b3a1b3d07d41daaeddbb09e8242c
2022-12-16 13:23:57 -05:00
- ${BPMN_SPEC_ABSOLUTE_DIR:-../../sample-process-models}:/app/process_models
- ./:/app
command: /app/bin/boot_in_docker_debug_mode
# the docs say we can disable healthchecks with disable: true
# but it returns a bad exit code so setup one that doesn't matter
# since there is nothing to healthcheck in this case
# https://docs.docker.com/compose/compose-file/compose-file-v3/#healthcheck
healthcheck:
test: cat /etc/hosts
interval: 10s
timeout: 5s
retries: 20
volumes:
spiffworkflow_backend:
driver: local