Closed sirolevo closed 4 years ago
Hi @siyar420 : I really think this example is completely out of date and requires a lot of change before it works, but if you want to work on it, here is where to start :
# --
export VERSION_OF_PORTUS_I_WANT_TO_WORK_WITH=2.4.3
export URI_OF_PORTUS_REPO=https://github.com/SUSE/Portus
mkdir ~/siyar
git clone "$URI_OF_PORTUS_REPO" ~/siyar
cd ~/siyar
git status
git branch -a
git checkout $VERSION_OF_PORTUS_I_WANT_TO_WORK_WITH
git branch -a
git status
cd examples/development/postgresql/
echo "#/bin/bash" >> init
echo " echo 'In the current configuration, this script will execute at start up of both portus and background process inside container'" >> init
echo " echo 'and this is how you can customize this init script'" >> init
echo "echo 'this is supposed to be a different script, that starts up portus or background process inside container'" >> init
echo "echo 'do you understand my point now ? cf. https://github.com/SUSE/Portus/issues/2272 '" >> init
export EXAMPLE_INIT_SCRIPT_URI=https://raw.githubusercontent.com/openSUSE/docker-containers/master/derived_images/portus/init
curl -L $EXAMPLE_INIT_SCRIPT_URI | grep -v '/bin/bash' > init
chmod +x ./init
#
docker-compose up -d && docker-compose logs -f
# Better now ?
# You'll probably miss other things, resulting in other errors.
# ever the less, as you just experienced, you can't really rely
# on docs today, or always keep inmind it can be out of date.
Thanks for all your contributions! This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Description
bash cannot find init.rb. I guess fix is to use
bundle exec rails runner /srv/Portus/examples/development/compose/init.rb
To reproduce this fix #2271 first.
Steps to reproduce
Attaching to portus_db_1, portus_portus_1, portus_webpack_1, portus_registry_1 portus_1 | bash: /srv/Portus/examples/development/compose/init: No such file or directory db_1 | db_1 | PostgreSQL Database directory appears to contain a database; Skipping initialization db_1 | db_1 | 2020-01-13 12:49:12.686 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432 db_1 | 2020-01-13 12:49:12.686 UTC [1] LOG: listening on IPv6 address "::", port 5432 db_1 | 2020-01-13 12:49:12.692 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" db_1 | 2020-01-13 12:49:12.712 UTC [20] LOG: database system was shut down at 2020-01-13 12:47:55 UTC db_1 | 2020-01-13 12:49:12.719 UTC [1] LOG: database system is ready to accept connections portus_portus_1 exited with code 127
Deployment information
Deployment method: With docker-compose.postgres.yml at the repo root.
Configuration:
docker-compose.postgres.yml
Portus version: #2228