Docker compose: add project name to the file.

When docker compose creates the various services, it names the
containers like <projectname>-<servicename>-<id>. If
COMPOSE_PROJECT_NAME is not set and there's no name property
at the root level of the yaml, the default project name is the
current directory. This breaks the deployment from directories
with unusable names, such as C:\.

Fixes #5304.

This should not break existing installations that are pulling from
master, as long as the base folder is danbooru/ (default for git clone).
This commit is contained in:
nonamethanks
2022-10-21 18:17:10 +02:00
parent f092bc28ee
commit d1b6f30517

View File

@@ -19,8 +19,11 @@
# Compose shipped with Ubuntu 18.04 LTS (version 1.17.4).
version: "3.4"
name: danbooru
x-base-template: &base-template
user: root
# pull_policy: always # Uncomment this to always pull the latest image when deploying.
image: ghcr.io/danbooru/danbooru:production # you can change this to danbooru:master to get the latest upstream changes
environment:
RAILS_ENV: production # Set this to development to force danbooru to freshly compile js/css assets (for example if you're doing local development)