GithubHelp home page GithubHelp logo

utensils / docker-lobsters Goto Github PK

View Code? Open in Web Editor NEW
54.0 11.0 38.0 28 KB

Lobsters in a minimal Docker container.

Home Page: https://github.com/lobsters/

License: MIT License

Ruby 31.27% Shell 16.63% Dockerfile 29.62% Makefile 22.48%
docker ruby rails docker-compose lobsters

docker-lobsters's Introduction

Lobste.rs in a minimal Docker image

CircleCI Docker Pulls Docker Stars

About

This repo contains a working example of how to use and deploy Lobsters within a Docker environment.
I have decided to create this project to assist anyone else wanting to get started with Lobsters quickly using Docker.

This image is built off of the official Ruby Docker image (ruby:2.7-alpine)

Quick Start

Using this repository.
This will serve up Lobsters at http://localhost/

git clone [email protected]:utensils/docker-lobsters.git
cd docker-lobsters
git submodule update --init --recursive
make
docker-compose up

Using the prebuilt docker hub build and official MariaDB image.
This will serve up Lobsters at http://localhost:3000/

docker run --name lobsters -v lobsters_data:/var/lib/mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=password -e MYSQL_DATABASE=lobsters -d mariadb
docker run -p 3000:3000 --link lobsters:mariadb utensils/lobsters

docker-lobsters's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-lobsters's Issues

twitter?

Getting this error in the logs:

app_1_8dd569ff291a | /lobsters/extras/twitter.rb:32:in oauth_request': no auth token configured (RuntimeError)`

It looks like its trying to automatically post to twitter. How do I configure that?

Please update to a version were everything is working;

I'm also trying to set-up the sign-up page instead of invitations and the possibily to disable them as well. Also the ability to toggle not user based but server based dark theme. Can you make a container that works like the site underneath? My container is functional, but still buggy.

I'm looking for something exactly like this: https://hipppo.fm/

Rails and Rake not found

Container throws the following error

Status: Downloaded newer image for jamesbrink/lobsters:latest
/usr/local/lib/ruby/site_ruby/2.3.0/rubygems.rb:283:in `find_spec_for_exe': can't find gem rake (>= 0.a) with executable rake (Gem::GemNotFoundException)
	from /usr/local/lib/ruby/site_ruby/2.3.0/rubygems.rb:302:in `activate_bin_path'
	from /usr/local/bin/rake:23:in `<main>'
2019-07-04 05:53:06 - DB Version: 
2019-07-04 05:53:06 - Creating database.
/usr/local/lib/ruby/site_ruby/2.3.0/rubygems.rb:283:in `find_spec_for_exe': can't find gem rake (>= 0.a) with executable rake (Gem::GemNotFoundException)
	from /usr/local/lib/ruby/site_ruby/2.3.0/rubygems.rb:302:in `activate_bin_path'
	from /usr/local/bin/rake:23:in `<main>'
2019-07-04 05:53:06 - Loading schema.
/usr/local/lib/ruby/site_ruby/2.3.0/rubygems.rb:283:in `find_spec_for_exe': can't find gem rake (>= 0.a) with executable rake (Gem::GemNotFoundException)
	from /usr/local/lib/ruby/site_ruby/2.3.0/rubygems.rb:302:in `activate_bin_path'
	from /usr/local/bin/rake:23:in `<main>'
2019-07-04 05:53:06 - Migrating database.
/usr/local/lib/ruby/site_ruby/2.3.0/rubygems.rb:283:in `find_spec_for_exe': can't find gem rake (>= 0.a) with executable rake (Gem::GemNotFoundException)
	from /usr/local/lib/ruby/site_ruby/2.3.0/rubygems.rb:302:in `activate_bin_path'
	from /usr/local/bin/rake:23:in `<main>'
2019-07-04 05:53:06 - Seeding database.
/usr/local/lib/ruby/site_ruby/2.3.0/rubygems.rb:283:in `find_spec_for_exe': can't find gem rake (>= 0.a) with executable rake (Gem::GemNotFoundException)
	from /usr/local/lib/ruby/site_ruby/2.3.0/rubygems.rb:302:in `activate_bin_path'
	from /usr/local/bin/rake:23:in `<main>'
2019-07-04 05:53:06 - No SECRET_KEY provided, generating one now.
2019-07-04 05:53:06 - Your new secret key: 72fbdf64319c9aab16793aa3dfdf0432ac220bbf9c8ae9ecc83b9117658cefc0bb58bdba8babdb02cab21f45b798952b7c58c97c264b772a2e279608baa15c08
/usr/local/bin/docker-entrypoint.sh: line 55: rails: not found
2019-07-04 05:53:06 - Exiting

How to reset adminstrator password?

Ask a silly question, how to do if I forgot the administrator password? I can't use the reset password function because I have not setup the email service for the site.

error I got running instructions

Gems updated: benchmark bigdecimal bundler cgi csv date delegate did_you_mean etc fcntl fiddle fileutils forwardable getoptlong io-console ipaddr irb reline json logger matrix mutex_m digest net-pop net-protocol net-smtp observer open3 openssl ostruct prime pstore psych racc rdoc readline readline-ext rexml rss singleton stringio strscan timeout tracer uri webrick yaml zlib
+ su lobsters -c 'gem install rake -v 13.0.1'
Successfully installed rake-13.0.1
1 gem installed
+ su lobsters -c 'bundle config set no-cach '\''true'\'''
Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.
+ su lobsters -c 'bundle install'
Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.
Fetching gem metadata from https://rubygems.org/.........
Your bundle is locked to mimemagic (0.3.5), but that version could not be found
in any of the sources listed in your Gemfile. If you haven't changed sources,
that means the author of mimemagic (0.3.5) has removed it. You'll need to update
your bundle to a version other than mimemagic (0.3.5) that hasn't been removed
in order to install.
The command '/bin/bash -c set -xe;     apk add --no-cache --virtual .build-deps         build-base         curl         gcc         git         gnupg         linux-headers         mariadb-connector-c-dev         mariadb-dev         sqlite-dev;     export PATH=/lobsters/.gem/ruby/2.7.0/bin:$PATH;     export SUPATH=$PATH;     export GEM_HOME="/lobsters/.gem";     export GEM_PATH="/lobsters/.gem";     export BUNDLE_PATH="/lobsters/.bundle";     cd /lobsters;     su lobsters -c "gem install bundler --user-install";     su lobsters -c "gem update";     su lobsters -c "gem install rake -v 13.0.1";     su lobsters -c "bundle config set no-cach 'true'";     su lobsters -c "bundle install";     if [ "${DEVELOPER_BUILD,,}" != "true" ];     then         apk del .build-deps;     fi;     mv /lobsters/Gemfile /lobsters/Gemfile.bak;     mv /lobsters/Gemfile.lock /lobsters/Gemfile.lock.bak;' returned a non-zero code: 7
make: *** [Makefile:21: build] Error 7

NameError: undefined method `extend_object' for class `Singleton'

Hi there,

I was trying to use this project with docker-compose up but it seems that rake db:create is failing and I end up with no MariaDB database. Here is the log: https://gist.github.com/etagwerker/2f869db10a9b5a11d308b2f7e5d5fd0f

I understand that rake db:create failed with another error:

app_1       | NameError: undefined method `extend_object' for class `Singleton'
app_1       | Did you mean?  extended
app_1       | /lobsters/.bundle/ruby/2.7.0/gems/activesupport-6.0.3.3/lib/active_support/deprecation.rb:3:in `require'
app_1       | /lobsters/.bundle/ruby/2.7.0/gems/activesupport-6.0.3.3/lib/active_support/deprecation.rb:3:in `<top (required)>'
app_1       | /lobsters/.bundle/ruby/2.7.0/gems/activesupport-6.0.3.3/lib/active_support/inflector/inflections.rb:5:in `require'
app_1       | /lobsters/.bundle/ruby/2.7.0/gems/activesupport-6.0.3.3/lib/active_support/inflector/inflections.rb:5:in `<top (required)>'
app_1       | /lobsters/.bundle/ruby/2.7.0/gems/activesupport-6.0.3.3/lib/active_support/inflections.rb:3:in `require'
app_1       | /lobsters/.bundle/ruby/2.7.0/gems/activesupport-6.0.3.3/lib/active_support/inflections.rb:3:in `<top (required)>'
app_1       | /lobsters/.bundle/ruby/2.7.0/gems/activesupport-6.0.3.3/lib/active_support/inflector/methods.rb:3:in `require'
app_1       | /lobsters/.bundle/ruby/2.7.0/gems/activesupport-6.0.3.3/lib/active_support/inflector/methods.rb:3:in `<top (required)>'
app_1       | /lobsters/.bundle/ruby/2.7.0/gems/activesupport-6.0.3.3/lib/active_support/dependencies/autoload.rb:3:in `require'
app_1       | /lobsters/.bundle/ruby/2.7.0/gems/activesupport-6.0.3.3/lib/active_support/dependencies/autoload.rb:3:in `<top (required)>'
app_1       | /lobsters/.bundle/ruby/2.7.0/gems/activesupport-6.0.3.3/lib/active_support.rb:27:in `require'
app_1       | /lobsters/.bundle/ruby/2.7.0/gems/activesupport-6.0.3.3/lib/active_support.rb:27:in `<top (required)>'
app_1       | /lobsters/.bundle/ruby/2.7.0/gems/railties-6.0.3.3/lib/rails.rb:7:in `require'
app_1       | /lobsters/.bundle/ruby/2.7.0/gems/railties-6.0.3.3/lib/rails.rb:7:in `<top (required)>'
app_1       | /lobsters/config/application.rb:3:in `require'
app_1       | /lobsters/config/application.rb:3:in `<top (required)>'
app_1       | /lobsters/Rakefile:4:in `<top (required)>'
app_1       | /lobsters/.gem/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
app_1       | (See full trace by running task with --trace)
app_1       | 2020-12-30 02:38:22 - Loading schema.

I figured this could be a problem with the git submodule being out of date, so I tried updating it with this command:

git submodule foreach git pull origin master

This brought some changes (lobsters/lobsters@d8f9a65) but it did not solve the problem.

Any ideas as to what could be wrong with my environment?

Please let me know.

Thank you!

SMTP settings ignored again

app_1_a021a68d583a | sendmail: can't connect to remote host (127.0.0.1): Connection refused
app_1_a021a68d583a | script/mail_new_activity.rb:184:in `write': Broken pipe (Errno::EPIPE)
app_1_a021a68d583a |    from script/mail_new_activity.rb:184:in `puts'
app_1_a021a68d583a |    from script/mail_new_activity.rb:184:in `block (3 levels) in <main>'
app_1_a021a68d583a |    from script/mail_new_activity.rb:178:in `popen'
app_1_a021a68d583a |    from script/mail_new_activity.rb:178:in `block (2 levels) in <main>'
app_1_a021a68d583a |    from script/mail_new_activity.rb:159:in `each'
app_1_a021a68d583a |    from script/mail_new_activity.rb:159:in `block in <main>'
app_1_a021a68d583a |    from /lobsters/.bundle/gems/activerecord-5.2.3/lib/active_record/relation/delegation.rb:71:in `each'
app_1_a021a68d583a |    from /lobsters/.bundle/gems/activerecord-5.2.3/lib/active_record/relation/delegation.rb:71:in `each'
app_1_a021a68d583a |    from script/mail_new_activity.rb:153:in `<main>'
```

The enviroment variables appear to not be set inside email.rb

```
ActionMailer::Base.smtp_settings = {
  :address => ENV.fetch("SMTP_HOST", "127.0.0.1"),
  :port => Integer(ENV.fetch("SMTP_PORT", 25)),
  :domain => Rails.application.domain,
  :enable_starttls_auto => (ENV["SMTP_STARTTLS_AUTO"] == "true"),
  :user_name => ENV.fetch("SMTP_USERNAME", ""),
  :password => ENV.fetch("SMTP_PASSWORD", ""),
}
```

Rebuild docker image

The docker image is over a year old and the latest lobsters commit it contains is from Jan 24, 2021.

why is yarn used ?

Hello !

I'm wondering why yarn is used in this docker image ? It doesn't seem lobsters needs it.

Unknown database 'lobsters_development'

After running docker-compose up I get a NoDatabaseError. Both the MariaDB and Lobster's machines are running in the expected ports.

rescue Mysql2::Error => error
  if error.error_number == ER_BAD_DB_ERROR
    raise ActiveRecord::NoDatabaseError
  else
    raise
  end

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.