version: "3" x-environment: &common-env DANBOORU_HOSTNAME: http://localhost:3000 DANBOORU_REDIS_URL: redis://redis DANBOORU_ELASTICSEARCH_HOST: elastic DANBOORU_MEMCACHED_SERVERS: memcached DANBOORU_IQDB_SERVER: http://iqdb:5588 # These are just development secrets, do not use them in production SECRET_TOKEN: 1c58518a891eff4520cadc59afa9e378a9325f1247544ff258096e497f095f45 SESSION_SECRET_KEY: 44b4f44e9f253c406cbe727d403d500c1cecff943e4d2aea8f5447f28846fffe x-depends-on: &common-depends-on elastic: condition: service_healthy memcached: condition: service_started postgres: condition: service_started redis: condition: service_started services: e621: build: context: ./ args: COMPOSE_PROFILES: ${COMPOSE_PROFILES-} image: e621 volumes: - .:/app - node_modules:/app/node_modules - public_packs:/app/public/packs - post_data:/app/public/data - ./docker/cron_tasks/daily:/etc/periodic/daily tmpfs: - /app/tmp/pids environment: <<: *common-env RAILS_ENV: development depends_on: <<: *common-depends-on autocompleted: condition: service_started iqdb: condition: service_started tty: true autocompleted: image: ghcr.io/e621ng/autocompleted:d0937172604cc9ece2a6a0963524518b592b03d8 command: /app/autocompleted environment: SERVER_ADDR: autocompleted:8118 PG__USER: e621 PG__HOST: postgres PG__PORT: 5432 PG__DBNAME: e621_development PG__POOL__MAX_SIZE: 1 nginx: image: nginx:stable-alpine volumes: - ./public:/app/public - post_data:/app/public/data - public_packs:/app/public/packs - ./docker/default.conf.template:/etc/nginx/templates/default.conf.template environment: NGINX_HOST: localhost NGINX_PORT: 3000 depends_on: - autocompleted - e621 ports: - "3000:3000" postgres: image: postgres:15-alpine environment: - POSTGRES_USER=e621 - POSTGRES_DB=e621_development - POSTGRES_HOST_AUTH_METHOD=trust volumes: - db_data:/var/lib/postgresql/data ports: - "34517:5432" redis: image: redis:7.0.10-alpine command: redis-server --save 10 1 --loglevel warning volumes: - redis_data_v2:/data memcached: image: memcached:1.5.22-alpine elastic: image: elasticsearch:7.14.2 environment: - discovery.type=single-node - xpack.security.enabled=false - logger.level=WARN - ES_JAVA_OPTS=-Xms1g -Xmx1g volumes: - elastic_data:/usr/share/elasticsearch/data healthcheck: interval: 10s timeout: 2s test: nc -z elastic 9200 iqdb: image: ghcr.io/e621ng/iqdb:d4fed9d9a51184e72d2f14d4ec461d7830bd177a command: iqdb http 0.0.0.0 5588 /iqdb/e621_v2.db volumes: - iqdb_data:/iqdb # Useful for development tests: image: e621 environment: <<: *common-env RAILS_ENV: test # Hide annoying output from libvips on corrupt files VIPS_WARNING: "0" volumes: - .:/app - ./docker/danbooru_local_config.rb:/app/config/danbooru_local_config.rb - node_modules:/app/node_modules depends_on: <<: *common-depends-on entrypoint: bundle exec rails test profiles: - tests rubocop: image: e621 volumes: - .:/app - rubocop_cache:/rubocop_cache entrypoint: bundle exec rubocop --cache-root /rubocop_cache profiles: - rubocop solargraph: image: e621 entrypoint: solargraph socket -h 0.0.0.0 working_dir: $PWD volumes: - .:$PWD ports: - 7658:7658 profiles: - solargraph volumes: post_data: iqdb_data: elastic_data: db_data: redis_data_v2: node_modules: public_packs: public_packs_test: rubocop_cache: