thedrummeraki/tanoshimu

View on GitHub
docker-compose.yml

Summary

Maintainability
Test Coverage
version: "3"
services:
  db:
    image: postgres
    volumes:
      - ./tmp/db:/var/lib/postgresql/data
    environment:
      POSTGRES_USER: anime
      POSTGRES_PASSWORD: isyourstoconquer

  redis:
    image: "redis:6"
    command: redis-server
    volumes:
      - "redis:/data"

  sidekiq:
    build:
      context: .
      target: dev
    command: bundle exec sidekiq -q active_storage_analysis -q active_storage_purge -q batch_queue -q sync -q default
    volumes:
      - .:/app
      - gems:/gems
      - tmp:/tmp
    depends_on:
      - redis
    environment:
      - REDIS_URL=redis://redis:6379
      - RAILS_LOG_TO_STDOUT=enabled
      - SYNC_CRAWLING=enabled

  web:
    build:
      context: .
      target: dev
    command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
    stdin_open: true
    tty: true
    env_file:
      - ./.env
    ports:
      - "80:3000"
    volumes:
      - .:/app
      - /app/node_modules
      - gems:/gems
      - tmp:/tmp
    environment:
      BUNDLE_PATH: /gems
      REDIS_URL: redis://redis:6379
      DISABLE_GOOGLE_LOGIN: "1"
      GOOGLE_OAUTH_REDIRECT_HOST: http://tanoshimu.aki
    depends_on:
      - db
      - redis

volumes:
  gems:
  redis:
  tmp: