libretime/docker-compose.override.yml
Keoni Mahelona 634e6e236d
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

90 lines
1.7 KiB
YAML

#
# This file is used for development. It it not intended for production!
# See https://libretime.org/docs/developer-manual/development/environment/#docker-compose
#
version: "3.7"
services:
postgres:
ports:
- 5432:5432
rabbitmq:
image: rabbitmq:management-alpine
ports:
- 5672:5672
- 15672:15672
playout:
build:
context: .
target: libretime-playout
volumes:
- ./playout:/src
- ./dev/playout:/app
liquidsoap:
build:
context: .
target: libretime-playout
ports:
- 1234:1234
volumes:
- ./playout:/src
- ./dev/playout:/app
- ./dev/certs:/certs
## See https://libretime.org/docs/admin-manual/tutorials/setup-a-pulseaudio-output-inside-containers/
# - ./dev/pulse.socket:/tmp/pulse.socket
# - ./docker/pulse.client.conf:/etc/pulse/client.conf
analyzer:
build:
context: .
target: libretime-analyzer
volumes:
- ./analyzer:/src
worker:
build:
context: .
target: libretime-worker
volumes:
- ./worker:/src
api:
build:
context: .
target: libretime-api
volumes:
- ./api:/src
command: /usr/local/bin/libretime-api runserver 0.0.0.0:9001
environment:
LIBRETIME_DEBUG: "true"
legacy:
build:
context: .
target: libretime-legacy
volumes:
- ./legacy:/var/www/html
nginx:
volumes:
- ./legacy:/var/www/html
icecast:
ports:
- 8000:8000
- 8443:8443
environment:
ICECAST_MAX_SOURCES: 10
volumes:
- ./dev/certs:/certs
- ./dev/icecast.xml:/etc/icecast.xml
mailpit:
image: axllent/mailpit
ports:
- 8025:8025
- 1025:1025