diff --git a/composes/readme.rst b/composes/readme.rst new file mode 100644 index 0000000..2040758 --- /dev/null +++ b/composes/readme.rst @@ -0,0 +1,8 @@ +Contains my own `compose.yaml` files for different projects. +Nothing fancy, but some of our customer projects include Solr or Elasticsearch. +TYPO3 Extension EXT:solr provides ready to use docker images for each version. +We can easily use them with compose and limit resource usage of Java, e.g. to 2 GB. +That's fine for local development. + +I collect all the files here in the folder and symlink them to the projects, +just like the shell.nix files. diff --git a/composes/soziopolis.yaml b/composes/soziopolis.yaml new file mode 100644 index 0000000..6536a20 --- /dev/null +++ b/composes/soziopolis.yaml @@ -0,0 +1,13 @@ +--- +# Do not use version 3 as we don't have mem_limit available +version: '2.2' +services: + solr: + image: docker.io/typo3solr/ext-solr:11.5.1 + mem_limit: '2GB' + volumes: + - solr-soziopolis:/var/solr/data/data + ports: + - "127.0.0.1:8983:8983" +volumes: + solr-soziopolis: diff --git a/home/packages.nix b/home/packages.nix index fcffea0..084c97e 100644 --- a/home/packages.nix +++ b/home/packages.nix @@ -36,7 +36,9 @@ with pkgs; [ kcachegrind geckodriver - docker-compose + podman-compose + # Dependencies of podman-compose + podman # In order to pull binaries from their. # E.g. phps: https://github.com/fossar/nix-phps#how-to-use diff --git a/home/packages/custom/project/default.nix b/home/packages/custom/project/default.nix index 30399b4..328bbdb 100644 --- a/home/packages/custom/project/default.nix +++ b/home/packages/custom/project/default.nix @@ -113,7 +113,7 @@ in writeShellApplication { tmux send-keys C-l # Missing C-m at end, because we don't want to submit. # We often don't need solr running to do our job. - tmux send-keys -t "$session:$windowId" "docker-compose run --rm --service-ports solr" + tmux send-keys -t "$session:$windowId" "podman-compose run --rm --service-ports solr" (( "windowId+=1" )) fi @@ -126,33 +126,20 @@ in writeShellApplication { tmux send-keys C-l # Missing C-m at end, because we don't want to submit. # We often don't need oraproxy running to do our job. - tmux send-keys -t "$session:$windowId" "docker-compose run --rm --service-ports oraproxy" + tmux send-keys -t "$session:$windowId" "podman-compose run --rm --service-ports oraproxy" (( "windowId+=1" )) fi # Start elastic container - if [ -d "$projectRoot/elastic/" ]; then - elasticPath="$projectRoot/elastic/" + if [ -d "$projectRoot/elasticsearch/" ]; then + elasticPath="$projectRoot/elasticsearch/" tmux new-window -n docker -t "$session" tmux send-keys -t "$session:$windowId" "cd $elasticPath" C-m tmux send-keys C-l # Missing C-m at end, because we don't want to submit. # We often don't need elastic running to do our job. - tmux send-keys -t "$session:$windowId" "docker-compose run --rm --service-ports elastic" - - (( "windowId+=1" )) - fi - # Start mongodb container - if [ -d "$projectRoot/mongodb/" ]; then - mongodbPath="$projectRoot/mongodb/" - - tmux new-window -n docker -t "$session" - tmux send-keys -t "$session:$windowId" "cd $mongodbPath" C-m - tmux send-keys C-l - # Missing C-m at end, because we don't want to submit. - # We often don't need mongodb running to do our job. - tmux send-keys -t "$session:$windowId" "docker-compose run --rm --service-ports mongodb" + tmux send-keys -t "$session:$windowId" "podman-compose run --rm --service-ports elasticsearch" (( "windowId+=1" )) fi