The server side runtime for our AppBuilder project.
Use ab-cli tool.
Run ./UP.sh
to bring up the Docker Stack. Options:
-d
: dev run develop mode (uses docker-compose.dev.yml)-t
: test run in test mode (allows test reset route)-q
: quiet run without starting logs
The default account credentials are:
- email:
[email protected]
- password:
admin
$ ./Down.sh
$ node logs
// or
$ ./logs.sh [option]
Rungit pull
to update the version file (version.json
).
Then run node dockerImageUpdate
to update the running services.
-
./mysql/init
The SQL files contained here will be used to populate the database for the first time.
Much of the config and data are actually saved onto Docker volumes, and are not directly binded to directories anymore. The data backup procedure is left as an exercise for the reader.
The ab-cli will help set the config and write .env
, docker-compose.yml
, and
docker-compose.override.yml
. Examples can be found in /examples/
, for a
manual install copy these files to the root directory and adjust them as needed.
The most important setting to change is MYSQL_PASSWORD
. This will be your
DB root password. Choose something secure.
Important note: When the MariaDB container starts up for the first time, it will set the database root password to the value you have specified. After that first time, changing this value will not affect the already established password.
Make sure to add your own settings before running the setup steps below.
Follow the Config section on configuring your DB credentials and other settings.
The following steps need to be done with the same docker stack name you plan to
run AppBuilder with (referred to here as mystack
). This should match the
STACKNAME
setting in your .env
file.
-
Turn on Docker Swarm if needed
$ docker swarm init
-
Copy dbinit-compose.yml from /examples to the project root.
$ cp ./examples/dbinit-compose.yml ./dbinit-compose.yml
-
Run dbinit-compose.yml
$ docker stack deploy -c dbinit-compose.yml mystack
- Open the logs for
mystack_db
$ docker service logs -f mystack_db
- Bring down the stack when you see
mysqld: ready for connections
$ docker stack rm mystack
- Open the logs for
-
Remove dbinit-compose.yml
$ rm ./dbinit-compose.yml
-
Run db migrations
$ ./migrate.sh
The runtime can be alternatively used with podman. Most of the scripts already support
podman. Make sure the environment variable PLATFORM
is set to podman
.