File tree 4 files changed +38
-5
lines changed
4 files changed +38
-5
lines changed Original file line number Diff line number Diff line change 5
5
6
6
source ./constants.sh
7
7
source ./util.sh
8
+ source ./patches.sh
8
9
9
10
env_file_exists () {
10
11
[ -f " ${ENV_FILE} " ]
@@ -14,6 +15,8 @@ env_barrier() {
14
15
if ! env_file_exists; then
15
16
error " Initial configuration outstanding (run $( highlight " './migrator install'" ) )"
16
17
fi
18
+
19
+ v3_20_0_add_arch_and_container_runtime
17
20
}
18
21
19
22
print_env () {
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # SPDX-License-Identifier: MIT
4
+ # SPDX-FileCopyrightText: 2022-2024 CYBERTEC PostgreSQL International GmbH <office@cybertec.at>
5
+
6
+ source ./constants.sh
7
+ source ./util.sh
8
+
9
+ v3_20_0_add_arch_and_container_runtime () {
10
+ if [ -z " $( print_env ' ARCH' ) " ]; then
11
+ local architecture=" "
12
+ case $( uname -m) in
13
+ x86_64) architecture=" amd64" ;;
14
+ aarch64|arm64) architecture=" arm64" ;;
15
+ * )
16
+ error " Unable to detect architecture $( highlight " $( uname -m) " ) "
17
+ error " Please file a ticket so we may resolve this issue:"
18
+ error " Public: https://github.com/cybertec-postgresql/cybertec_migrator/issues/new/choose"
19
+ error " Customers: https://cybertec.atlassian.net/servicedesk/customer/portal/3/group/4/create/23"
20
+ exit 1
21
+ ;;
22
+ esac
23
+ set_env_file_variable " ARCH" " $architecture "
24
+ fi
25
+
26
+ if [ -z " $( print_env ' CONTAINER_RUNTIME' ) " ]; then
27
+ set_env_file_variable " CONTAINER_RUNTIME" " docker"
28
+ fi
29
+ }
Original file line number Diff line number Diff line change 4
4
# SPDX-FileCopyrightText: 2022-2024 CYBERTEC PostgreSQL International GmbH <office@cybertec.at>
5
5
6
6
runtime_up () {
7
- docker compose up -d
7
+ docker compose --env-file ../.env up -d
8
8
}
9
9
10
10
runtime_down () {
11
- docker compose down
11
+ docker compose --env-file ../.env down
12
12
}
13
13
14
14
runtime_pull () {
15
- docker compose pull 2>&1 > /dev/null
15
+ docker compose --env-file ../.env pull 2>&1 > /dev/null
16
16
}
17
17
18
18
runtime_logs () {
19
- docker compose logs --timestamps --tail=' all' $1
19
+ docker compose --env-file ../.env logs --timestamps --tail=' all' $1
20
20
}
21
21
22
22
runtime_load () {
@@ -29,7 +29,7 @@ runtime_run() {
29
29
local mount=" ${3} "
30
30
31
31
if [ -n " ${mount} " ]; then
32
- mount=" --mount ${mount} "
32
+ mount=" --volume ${mount} "
33
33
fi
34
34
35
35
eval " docker run ${mount} ${image} bash -c \" ${cmd} \" "
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ source ./env.sh
7
7
source ./console.sh
8
8
9
9
if env_file_exists; then
10
+ v3_20_0_add_arch_and_container_runtime
10
11
case " $( print_env ' CONTAINER_RUNTIME' ) " in
11
12
docker) source ./runtime.docker.sh ;;
12
13
podman) source ./runtime.podman.sh ;;
You can’t perform that action at this time.
0 commit comments