Migrate from docker to podman (compose)
As this is rootless, daemonless and can be maintained via home manager instead of system.
This commit is contained in:
parent
34784bf81c
commit
3b1bf7f698
8
composes/readme.rst
Normal file
8
composes/readme.rst
Normal file
|
@ -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.
|
13
composes/soziopolis.yaml
Normal file
13
composes/soziopolis.yaml
Normal file
|
@ -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:
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue