Fix the quickstart command in the README not working for Ubuntu 18.04. This was because the Docker Compose file was set to version 3.7, but Ubuntu 18.04 ships an older version of Docker Compose that only supports version 3.4.
56 lines
1.5 KiB
YAML
56 lines
1.5 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
|
|
#
|
|
# References:
|
|
#
|
|
# * https://docs.docker.com/get-docker/
|
|
# * https://docs.docker.com/compose/install/
|
|
# * https://docs.docker.com/compose/compose-file/compose-versioning
|
|
# * https://docs.docker.com/compose/release-notes
|
|
|
|
# Version 3.4 is the latest version that is supported by the version of Docker
|
|
# Compose shipped with Ubuntu 18.04 LTS (version 1.17.4).
|
|
version: "3.4"
|
|
|
|
services:
|
|
danbooru:
|
|
# image: evazion/danbooru
|
|
build:
|
|
context: ../..
|
|
dockerfile: config/docker/Dockerfile.danbooru
|
|
ports:
|
|
- "80:3000"
|
|
environment:
|
|
- RAILS_ENV=production
|
|
- RAILS_SERVE_STATIC_FILES=true
|
|
- DATABASE_URL=postgresql://danbooru@postgres/danbooru
|
|
- DANBOORU_CANONICAL_URL=http://localhost
|
|
volumes:
|
|
- "danbooru-images:/danbooru/public/data"
|
|
depends_on:
|
|
- postgres
|
|
command: ["bash", "-c", "bin/rails db:setup; 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
|