Rework Dockerfile.
* Optimize Dockerfile to minimize size of the Docker image. * Specify exact versions of important dependencies (Ruby, Node, Vips) to ensure our dependencies are up to date and locked to known versions. * Install Vips from source because the version that ships with Ubuntu is too old. * Install FFmpeg from source because otherwise using the Ubuntu package pulls in tons of video libraries we don't need, bloating the image.
This commit is contained in:
@@ -16,14 +16,15 @@ services:
|
||||
ports:
|
||||
- "80:3000"
|
||||
environment:
|
||||
- RAILS_ENV=development
|
||||
- RAILS_ENV=production
|
||||
- RAILS_SERVE_STATIC_FILES=true
|
||||
- DATABASE_URL=postgresql://danbooru@postgres/danbooru
|
||||
- DANBOORU_CANONICAL_URL=http://localhost
|
||||
volumes:
|
||||
- "danbooru-images:/home/danbooru/app/public/data"
|
||||
- "danbooru-images:/danbooru/public/data"
|
||||
depends_on:
|
||||
- postgres
|
||||
entrypoint: ["bash", "-c", "bin/rails db:setup 2> /dev/null; bin/rails server -b 0.0.0.0"]
|
||||
command: ["bash", "-c", "bin/rails db:setup; bin/rails server -b 0.0.0.0"]
|
||||
user: root
|
||||
|
||||
postgres:
|
||||
|
||||
Reference in New Issue
Block a user