Skip to content

Conversation

@ChristopherJHart
Copy link

The latest versions of Docker have the docker compose command built in (or at least, provided through a plugin), thus rendering the docker-compose command obsolete in modern Docker installations.

This PR modifies Bash scripts that reference the docker-compose command to leverage a dynamically-determined Docker command instead. This will enable backwards-compatibility with older system that only have docker-compose available while introducing support for the new docker compose command. Furthermore, future extendability may be possible for other containerization platforms/commands, like podman.

This was tested on a fresh installation as shown below.

administrator@xpresso:/workspace/xpresso$ ./setup.sh http://xpresso.foobar.com/
ADVERTISED_URL: http://xpresso.foobar.com/
Do you wish to continue? yes

Creating data and logs directory
mkdir: cannot create directory ‘logs’: File exists
mkdir: cannot create directory ‘logs/database’: File exists
mkdir: cannot create directory ‘data’: File exists
mkdir: cannot create directory ‘data/elastic’: File exists
mkdir: cannot create directory ‘data/elastic_snapshots’: File exists
mkdir: cannot create directory ‘data/mysql’: File exists
Warning:
Elasticsearch uses a mmapfs directory by default to store its indices. The default operating system limits on mmap counts is likely to be too low, which may result in out of memory exceptions.
Visit: https://www.elastic.co/guide/en/elasticsearch/reference/master/_maximum_map_count_check.html
Writing 'vm.max_map_count=262144' to '/etc/sysctl.conf'
Do you wish to edit /etc/sysctl.conf?yes
sed: couldn't open temporary file /etc/sedntyG2M: Permission denied
./setup.sh: line 59: /etc/sysctl.conf: Permission denied
file written
Initialization of Setup complete!
Bringing up the database....
WARN[0000] /workspace/xpresso/docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion
[+] Running 23/23
 ✔ elasticsearch Pulled                                                                                                                                                                  17.6s
   ✔ c808caf183b6 Pull complete                                                                                                                                                           5.4s
   ✔ efa872b6c649 Pull complete                                                                                                                                                           6.2s
   ✔ 04bbdabaaea4 Pull complete                                                                                                                                                           6.2s
   ✔ 16f3820abf43 Pull complete                                                                                                                                                          15.5s
   ✔ 4670c08b6efd Pull complete                                                                                                                                                          15.6s
   ✔ 2a396610da0f Pull complete                                                                                                                                                          15.6s
   ✔ 6667d6a1f511 Pull complete                                                                                                                                                          15.6s
 ✔ cache Pulled                                                                                                                                                                           2.3s
   ✔ f17d81b4b692 Pull complete                                                                                                                                                           1.7s
   ✔ b32474098757 Pull complete                                                                                                                                                           1.7s
   ✔ 8980cabe8bc2 Pull complete                                                                                                                                                           1.7s
   ✔ 58af19693e78 Pull complete                                                                                                                                                           1.8s
   ✔ a977782cf22d Pull complete                                                                                                                                                           1.9s
   ✔ 9c1e268980b7 Pull complete                                                                                                                                                           1.9s
 ✔ database Pulled                                                                                                                                                                        8.5s
   ✔ 8969f19fb2cc Pull complete                                                                                                                                                           3.3s
   ✔ 18ff34a960f0 Pull complete                                                                                                                                                           3.3s
   ✔ 1059844cbb8f Pull complete                                                                                                                                                           7.9s
   ✔ 3bd4cb0b78d1 Pull complete                                                                                                                                                           8.0s
   ✔ 901b41fa66ef Pull complete                                                                                                                                                           8.0s
   ✔ b33be9f4a1f3 Pull complete                                                                                                                                                           8.0s
   ✔ 38b3da6a86f7 Pull complete                                                                                                                                                           8.0s
[+] Running 4/4
 ✔ Network xpresso_default            Created                                                                                                                                             0.0s
 ✔ Container xpresso-cache-1          Started                                                                                                                                             1.9s
 ✔ Container xpresso-elasticsearch-1  Started                                                                                                                                             1.9s
 ✔ Container xpresso-database-1       Started                                                                                                                                             1.9s
Bringing up the management service....
WARN[0000] /workspace/xpresso/docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion
[+] Running 22/22
 ✔ management Pulled                                                                                                                                                                     15.1s
   ✔ 955615a668ce Pull complete                                                                                                                                                           3.8s
   ✔ 2756ef5f69a5 Pull complete                                                                                                                                                           4.0s
   ✔ 911ea9f2bd51 Pull complete                                                                                                                                                           4.1s
   ✔ 27b0a22ee906 Pull complete                                                                                                                                                           5.5s
   ✔ 8584d51a9262 Pull complete                                                                                                                                                          11.3s
   ✔ 524774b7d363 Pull complete                                                                                                                                                          11.7s
   ✔ 9460f6b75036 Pull complete                                                                                                                                                          12.0s
   ✔ 9bc548096c18 Pull complete                                                                                                                                                          12.0s
   ✔ 1d87379b86b8 Pull complete                                                                                                                                                          12.2s
   ✔ 78f1b4c7e490 Pull complete                                                                                                                                                          12.2s
   ✔ c03b122696bc Pull complete                                                                                                                                                          12.2s
   ✔ 4ce8cd596e39 Pull complete                                                                                                                                                          12.3s
   ✔ 21dad041825f Pull complete                                                                                                                                                          14.2s
   ✔ 894a7f5be21a Pull complete                                                                                                                                                          14.2s
   ✔ e38d7b2ce07d Pull complete                                                                                                                                                          14.3s
   ✔ 7f0f61171e81 Pull complete                                                                                                                                                          14.3s
   ✔ 51e048e00414 Pull complete                                                                                                                                                          14.3s
   ✔ 00ad2785d16a Pull complete                                                                                                                                                          14.3s
   ✔ 4599e20f1f95 Pull complete                                                                                                                                                          14.5s
   ✔ 5ea2b1cf8112 Pull complete                                                                                                                                                          14.6s
   ✔ c076457909e3 Pull complete                                                                                                                                                          14.6s
[+] Running 3/3
 ✔ Container xpresso-cache-1       Running                                                                                                                                                0.0s
 ✔ Container xpresso-database-1    Running                                                                                                                                                0.0s
 ✔ Container xpresso-management-1  Started                                                                                                                                                1.8s
run: 'docker compose up -d' to start xpresso.
administrator@xpresso:/workspace/xpresso$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant