fix: incorrect docker compose version (#2975)
### Description
There is no docker compose file version 3.9, see
https://docs.docker.com/compose/compose-file/compose-versioning/. The
`init` command is used in the compose file and I wonder if we can set
this to 3.7. When I followed the docs here
https://libretime.org/docs/admin-manual/install/install-using-docker/, I
was unable to get the docker compose to work because of a version issue.
So I upgraded docker (on Ubuntu focal) but realised that 3.9 isn't even
mentioned on the Docker website. 3.8 is, which I tried to use but it
failed. 3.7 worked for me.
**I have updated the documentation to reflect these changes**:
Docs are not affected.
### Testing Notes
**What I did:**
I was following the
[docs](https://libretime.org/docs/admin-manual/install/install-using-docker/)
but then rand into a docker compose file version error. I'm using docker
engine version 26,
```
Client: Docker Engine - Community
Version: 26.0.0
API version: 1.45
Go version: go1.21.8
Git commit: 2ae903e
Built: Wed Mar 20 15:17:51 2024
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 26.0.0
API version: 1.45 (minimum version 1.24)
Go version: go1.21.8
Git commit: 8b79278
Built: Wed Mar 20 15:17:51 2024
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.28
GitCommit: ae07eda36dd25f8a1b98dfbf587313b99c0190bb
runc:
Version: 1.1.12
GitCommit: v1.1.12-0-g51d5e94
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Ubuntu Version
Distributor ID: Ubuntu
Description: Ubuntu 20.04.6 LTS
Release: 20.04
Codename: focal
```
which is very recent. When I checked the docker compose version
[page](https://docs.docker.com/compose/compose-file/compose-versioning/),
it doesn't even list 3.9 as a version, only 3.8. For whatever reason 3.8
did not work for me, but 3.7 does.
**How you can replicate my testing:**
Follow the docs,
https://libretime.org/docs/admin-manual/install/install-using-docker/.
If docker compose fails to run, and says
```
ERROR: Version in "./docker-compose.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version (e.g "2.2" or "3.3") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1.
```
then change the version to 3.7.
### **Links**
N/A
2024-03-26 10:29:16 +01:00
|
|
|
version: "3.7"
|
2022-02-23 08:50:32 +01:00
|
|
|
|
|
|
|
services:
|
2022-07-25 15:22:14 +02:00
|
|
|
postgres:
|
2023-03-03 17:20:11 +01:00
|
|
|
image: postgres:15
|
2022-07-25 15:22:14 +02:00
|
|
|
volumes:
|
|
|
|
- postgres_data:/var/lib/postgresql/data
|
2022-02-23 08:50:32 +01:00
|
|
|
environment:
|
2023-03-03 17:23:26 +01:00
|
|
|
POSTGRES_USER: ${POSTGRES_USER:-libretime}
|
|
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-libretime} # Change me !
|
2022-04-04 16:28:58 +02:00
|
|
|
healthcheck:
|
2022-07-25 15:22:14 +02:00
|
|
|
test: pg_isready -U libretime
|
2022-02-23 08:50:32 +01:00
|
|
|
|
|
|
|
rabbitmq:
|
2024-02-25 06:39:10 +01:00
|
|
|
image: rabbitmq:3.13-alpine
|
2022-02-23 08:50:32 +01:00
|
|
|
environment:
|
2023-03-03 17:23:26 +01:00
|
|
|
RABBITMQ_DEFAULT_VHOST: ${RABBITMQ_DEFAULT_VHOST:-/libretime}
|
|
|
|
RABBITMQ_DEFAULT_USER: ${RABBITMQ_DEFAULT_USER:-libretime}
|
|
|
|
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_DEFAULT_PASS:-libretime} # Change me !
|
2022-07-26 18:32:11 +02:00
|
|
|
healthcheck:
|
|
|
|
test: rabbitmq-diagnostics -q ping
|
2022-07-25 15:22:14 +02:00
|
|
|
|
2022-06-09 17:21:29 +02:00
|
|
|
playout:
|
|
|
|
image: ghcr.io/libretime/libretime-playout:${LIBRETIME_VERSION:-latest}
|
2023-07-12 14:01:21 +02:00
|
|
|
init: true
|
|
|
|
ulimits:
|
|
|
|
nofile: 1024
|
2022-06-09 17:21:29 +02:00
|
|
|
depends_on:
|
|
|
|
- rabbitmq
|
|
|
|
volumes:
|
|
|
|
- ${LIBRETIME_CONFIG_FILEPATH:-./config.yml}:/etc/libretime/config.yml:ro
|
|
|
|
- libretime_playout:/app
|
|
|
|
environment:
|
2023-12-29 17:49:07 +01:00
|
|
|
LIBRETIME_GENERAL_PUBLIC_URL: http://nginx:8080
|
2022-06-09 17:21:29 +02:00
|
|
|
|
|
|
|
liquidsoap:
|
|
|
|
image: ghcr.io/libretime/libretime-playout:${LIBRETIME_VERSION:-latest}
|
|
|
|
command: /usr/local/bin/libretime-liquidsoap
|
2023-07-12 14:01:21 +02:00
|
|
|
init: true
|
|
|
|
ulimits:
|
|
|
|
nofile: 1024
|
2022-06-09 17:21:29 +02:00
|
|
|
ports:
|
|
|
|
- 8001:8001
|
|
|
|
- 8002:8002
|
|
|
|
depends_on:
|
|
|
|
- rabbitmq
|
|
|
|
volumes:
|
|
|
|
- ${LIBRETIME_CONFIG_FILEPATH:-./config.yml}:/etc/libretime/config.yml:ro
|
|
|
|
- libretime_playout:/app
|
|
|
|
environment:
|
2023-12-29 17:49:07 +01:00
|
|
|
LIBRETIME_GENERAL_PUBLIC_URL: http://nginx:8080
|
2022-06-09 17:21:29 +02:00
|
|
|
|
|
|
|
analyzer:
|
|
|
|
image: ghcr.io/libretime/libretime-analyzer:${LIBRETIME_VERSION:-latest}
|
2023-07-12 14:01:21 +02:00
|
|
|
init: true
|
|
|
|
ulimits:
|
|
|
|
nofile: 1024
|
2022-06-09 17:21:29 +02:00
|
|
|
depends_on:
|
|
|
|
- rabbitmq
|
|
|
|
volumes:
|
|
|
|
- ${LIBRETIME_CONFIG_FILEPATH:-./config.yml}:/etc/libretime/config.yml:ro
|
|
|
|
- libretime_storage:/srv/libretime
|
|
|
|
environment:
|
2023-12-29 17:49:07 +01:00
|
|
|
LIBRETIME_GENERAL_PUBLIC_URL: http://nginx:8080
|
2022-06-09 17:21:29 +02:00
|
|
|
|
|
|
|
worker:
|
|
|
|
image: ghcr.io/libretime/libretime-worker:${LIBRETIME_VERSION:-latest}
|
2023-07-12 14:01:21 +02:00
|
|
|
init: true
|
|
|
|
ulimits:
|
|
|
|
nofile: 1024
|
2022-06-09 17:21:29 +02:00
|
|
|
depends_on:
|
|
|
|
- rabbitmq
|
|
|
|
volumes:
|
|
|
|
- ${LIBRETIME_CONFIG_FILEPATH:-./config.yml}:/etc/libretime/config.yml:ro
|
|
|
|
environment:
|
2023-12-29 17:49:07 +01:00
|
|
|
LIBRETIME_GENERAL_PUBLIC_URL: http://nginx:8080
|
2022-06-09 17:21:29 +02:00
|
|
|
|
|
|
|
api:
|
|
|
|
image: ghcr.io/libretime/libretime-api:${LIBRETIME_VERSION:-latest}
|
2023-07-12 14:01:21 +02:00
|
|
|
init: true
|
|
|
|
ulimits:
|
|
|
|
nofile: 1024
|
2022-06-09 17:21:29 +02:00
|
|
|
depends_on:
|
|
|
|
- postgres
|
|
|
|
- rabbitmq
|
|
|
|
volumes:
|
|
|
|
- ${LIBRETIME_CONFIG_FILEPATH:-./config.yml}:/etc/libretime/config.yml:ro
|
|
|
|
- libretime_storage:/srv/libretime
|
|
|
|
|
|
|
|
legacy:
|
|
|
|
image: ghcr.io/libretime/libretime-legacy:${LIBRETIME_VERSION:-latest}
|
2023-07-12 14:01:21 +02:00
|
|
|
init: true
|
|
|
|
ulimits:
|
|
|
|
nofile: 1024
|
2022-06-09 17:21:29 +02:00
|
|
|
depends_on:
|
|
|
|
- postgres
|
|
|
|
- rabbitmq
|
|
|
|
volumes:
|
|
|
|
- ${LIBRETIME_CONFIG_FILEPATH:-./config.yml}:/etc/libretime/config.yml:ro
|
|
|
|
- libretime_assets:/var/www/html
|
|
|
|
- libretime_storage:/srv/libretime
|
|
|
|
|
|
|
|
nginx:
|
|
|
|
image: nginx
|
|
|
|
ports:
|
2023-12-29 17:49:07 +01:00
|
|
|
- 8080:8080
|
2022-09-15 11:51:57 +02:00
|
|
|
depends_on:
|
|
|
|
- legacy
|
2022-06-09 17:21:29 +02:00
|
|
|
volumes:
|
|
|
|
- libretime_assets:/var/www/html:ro
|
2023-12-30 18:59:15 +01:00
|
|
|
- libretime_storage:/srv/libretime:ro
|
2022-06-09 17:21:29 +02:00
|
|
|
- ${NGINX_CONFIG_FILEPATH:-./nginx.conf}:/etc/nginx/conf.d/default.conf:ro
|
|
|
|
|
|
|
|
icecast:
|
2022-09-20 11:35:32 +02:00
|
|
|
image: ghcr.io/libretime/icecast:2.4.4
|
2022-06-09 17:21:29 +02:00
|
|
|
ports:
|
|
|
|
- 8000:8000
|
|
|
|
environment:
|
2023-03-03 17:23:26 +01:00
|
|
|
ICECAST_SOURCE_PASSWORD: ${ICECAST_SOURCE_PASSWORD:-hackme} # Change me !
|
|
|
|
ICECAST_ADMIN_PASSWORD: ${ICECAST_ADMIN_PASSWORD:-hackme} # Change me !
|
|
|
|
ICECAST_RELAY_PASSWORD: ${ICECAST_RELAY_PASSWORD:-hackme} # Change me !
|
2022-06-09 17:21:29 +02:00
|
|
|
|
2022-07-25 15:22:14 +02:00
|
|
|
volumes:
|
|
|
|
postgres_data: {}
|
2022-06-09 17:21:29 +02:00
|
|
|
libretime_storage: {}
|
|
|
|
libretime_assets: {}
|
|
|
|
libretime_playout: {}
|