Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
alistar79 opened this issue Jul 3, 2018 · 9 comments

Comments

@alistar79
Copy link

alistar79 commented Jul 3, 2018

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"
@alistar79
Copy link
Author

As this depends on mysql 5.7 but someone forgot to pin it in docker-compose and due to the root password already being set and jackhammer web suffering to use it these are the changes:

image: mysql:5.7

     MYSQL_USER: jackhammer
     MYSQL_PASSWORD: jackhammer

@alistar79
Copy link
Author

@shadsidd can you roll these in to save others from pain. Also your website is down Ta!

@alistar79
Copy link
Author

I also had to run inside the container:

bundle exec rake db:seed

there was a number of gem installs prior to this too as I was trying a rake db:seed which failed and suggested I gem install a package or 5

@dkogue
Copy link

dkogue commented Jul 3, 2018

did you manage to add any tools? I am trying to add Zap may be you can have a look at my logs. Thanks in advance.

@alistar79
Copy link
Author

not as yet! happy to see what i can spot if you have output tho?

@dkogue
Copy link

dkogue commented Jul 4, 2018

#100
you can check all logs there.

@alistar79
Copy link
Author

sorry dood looks like their ruby env is all messed up but how and how to fix not sure im not a ruby dev

@dkogue
Copy link

dkogue commented Jul 4, 2018

Thanks @alistar79 for your feedback. It is so unfortunate that I spent the past one month and half trying to make this framework work. Maybe you want to have look at SecureCodeBox.

@alistar79
Copy link
Author

id try openvas @dkogue never let me down in the past

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants