Skip to content

For those looking to get this working currently... docker-compose.yml replacement #102

@alistar79

Description

@alistar79
version: '3'
volumes:
  # We'll define a volume that will store the data from the mysql databases:
  mysql-data:
    driver: local
services:
 mysqldb:
   image: mysql:5.7
   container_name: jackhammer-db
   environment:
     MYSQL_ROOT_PASSWORD: root
     MYSQL_USER: jackhammer
     MYSQL_PASSWORD: jackhammer
     MYSQL_DATABASE: jackhammer_production
   ports:
     - "3306:3306"
   volumes: 
      - mysql-data:/usr/local/bin/mysql
   restart: always
   #healthcheck:
   #  test: "nc -z localhost 3306"
   #  interval: 1s
   #  retries: 120
 web:
   build: ./web
   volumes:
     - '.:/jackhammer'
   ports:
     - "5000:3000"
   command: bash -c "mkdir -p tmp/pids && RAILS_ENV=production bundle exec rake db:migrate && RAILS_ENV=production bundle exec sidekiq -C config/sidekiq.yml -d && bundle exec puma -e production -b tcp://0.0.0.0:3000"
   environment:
     - REDIS_URL=redis://redis:6379
     - SECRET_KEY_BASE=454ab84a2554a5e715db90c7560a06d8a20811d614e7313de05495ecdeac9614c4c3d263df1a5892b92d6c32ea06d4defbd2492c598e8295f89b8b316db25842
     - RAILS_SERVE_STATIC_FILES=true
     - RAILS_ENV=production
     - MYSQL_DB=jackhammer_production
     - MYSQL_HOST=mysqldb
     - MYSQL_USER=jackhammer
     - MYSQL_PASSWORD=jackhammer
   links:
     - mysqldb:mysqldb
     - redis:redis
   depends_on:
     - mysqldb
     - redis
 redis:
   image: redis
   ports:
     - "6379"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions