thedrummeraki/tanoshimu

View on GitHub
docker-compose.prod.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: .
    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
    env_file:
      - ./.env.prod
    environment:
      REDIS_URL: redis://redis:6379
      RAILS_ENV: production
      RACK_ENV: production
      WEB_CONCURRENCY: 8

  web:
    build: .
    command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails server -b 0.0.0.0 -p 3000"
    stdin_open: true
    tty: true
    env_file:
      - ./.env.prod
    ports:
      - "40000:3000"
    volumes:
      - .:/app
      - /app/node_modules
      - gems:/gems
      - tmp:/tmp
    restart: always
    environment:
      BUNDLE_PATH: /gems
      REDIS_URL: redis://redis:6379
      RAILS_ENV: production
      RACK_ENV: production
      WEB_CONCURRENCY: 8
      GRAPHQL_HOST: https://jibun.akinyele.ca
    depends_on:
      - db

volumes:
  gems:
  redis:
  tmp: