Add a Docker Compose file that launches a minimal Danbooru instance in a Docker container with a single command. This is suitable as a quick demo or for personal use, not for public-facing sites. To use it, just run `bin/danbooru`. This is a wrapper script that installs Docker Compose then uses it to start Danbooru. This will generate a lot of debug output and take several minutes while it builds the Docker containers. Be patient. When it's done, you should have an empty booru accessible at http://localhost.
45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
# A Docker Compose file that launches a minimal Danbooru instance. This is
|
|
# suitable as a quick demo or for personal use, not for public-facing sites.
|
|
#
|
|
# Usage:
|
|
#
|
|
# $ docker-compose -f config/docker/docker-compose.simple.yaml up
|
|
# $ docker-compose -f config/docker/docker-compose.simple.yaml down
|
|
|
|
version: "3.7"
|
|
services:
|
|
danbooru:
|
|
# image: evazion/danbooru
|
|
build:
|
|
context: ../..
|
|
dockerfile: config/docker/Dockerfile.danbooru
|
|
ports:
|
|
- "80:3000"
|
|
environment:
|
|
- RAILS_ENV=development
|
|
- DATABASE_URL=postgresql://danbooru@postgres/danbooru
|
|
- DANBOORU_CANONICAL_URL=http://localhost
|
|
volumes:
|
|
- "danbooru-images:/home/danbooru/app/public/data"
|
|
depends_on:
|
|
- postgres
|
|
entrypoint: ["bash", "-c", "bin/rails db:setup 2> /dev/null; bin/rails server -b 0.0.0.0"]
|
|
user: root
|
|
|
|
postgres:
|
|
# image: evazion/postgres
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.postgres
|
|
environment:
|
|
POSTGRES_USER: danbooru
|
|
POSTGRES_HOST_AUTH_METHOD: trust
|
|
volumes:
|
|
- "danbooru-data:/var/lib/postgresql/data"
|
|
|
|
volumes:
|
|
danbooru-images:
|
|
name: danbooru-images
|
|
danbooru-data:
|
|
name: danbooru-data
|