Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-compose.yml doesn't work #442

Open
spam0115 opened this issue Aug 31, 2024 · 0 comments
Open

docker-compose.yml doesn't work #442

spam0115 opened this issue Aug 31, 2024 · 0 comments

Comments

@spam0115
Copy link

When using the first docker-compose.yml shown in your readme, I get the following error:
validating /home/yournamehere/papermerge/docker-compose.yml: services.web.environment must be a mapping

Here is the yml that produced that error:
version: "3.9"

x-backend: &common
image: papermerge/papermerge:3.0.3
environment:
PAPERMERGE__SECURITY__SECRET_KEY: 12345
PAPERMERGE__AUTH__USERNAME: john
PAPERMERGE__AUTH__PASSWORD: hohoho
PAPERMERGE__DATABASE__URL: postgresql://scott:tiger@db:5432/mydatabase
PAPERMERGE__REDIS__URL: redis://redis:6379/0
volumes:
- index_db:/core_app/index_db
- media:/core_app/media
services:
web:
<<: *common
ports:
- "12000:80"
depends_on:
- redis
- db
worker:
<<: *common
command: worker
redis:
image: redis:6
db:
image: bitnami/postgresql:16.1.0
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
POSTGRESQL_USER: scott
POSTGRESQL_PASSWORD: tiger
POSTGRESQL_POSTGRES_PASSWORD: tiger
POSTGRESQL_DATABASE: mydatabase
volumes:
postgres_data:
index_db:
media:

Chatgpt fixed it into the following format for me. It worked. Chatgpt said the problem was "the environment section is not correctly formatted as a mapping (key-value pairs). In YAML, mappings are represented with a colon (:) followed by a space, and lists are represented with a hyphen (-)."

version: "3.9"

x-backend: &common
image: papermerge/papermerge:3.0.3
environment:
PAPERMERGE__SECURITY__SECRET_KEY: "12345"
PAPERMERGE__AUTH__USERNAME: "john"
PAPERMERGE__AUTH__PASSWORD: "hohoho"
PAPERMERGE__DATABASE__URL: "postgresql://scott:tiger@db:5432/mydatabase"
PAPERMERGE__REDIS__URL: "redis://redis:6379/0"
volumes:
- index_db:/core_app/index_db
- media:/core_app/media

services:
web:
<<: *common
ports:
- "12000:80"
depends_on:
- redis
- db

worker:
<<: *common
command: worker

redis:
image: redis:6

db:
image: bitnami/postgresql:16.1.0
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
POSTGRESQL_USER: scott
POSTGRESQL_PASSWORD: tiger
POSTGRESQL_POSTGRES_PASSWORD: tiger
POSTGRESQL_DATABASE: mydatabase

volumes:
postgres_data:
index_db:
media:

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

No branches or pull requests

1 participant