mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-28 09:24:24 +01:00
removes ADMIN_EMAIL and ADMIN_PASSWORD from Rails env because they are only used once when seeding the db
This commit is contained in:
parent
1ac8092ba4
commit
739d9562fd
@ -1 +1 @@
|
||||
2.5.9
|
||||
2.5.10-dev
|
||||
|
@ -127,7 +127,7 @@ In you only intend to run fab-manager on your local machine for testing purposes
|
||||
```bash
|
||||
rake db:create
|
||||
rake db:migrate
|
||||
rake db:seed
|
||||
ADMIN_EMAIL=youradminemail ADMIN_PASSWORD=youradminpassword rake db:seed
|
||||
```
|
||||
|
||||
9. Create the pids folder used by Sidekiq. If you want to use a different location, you can configure it in `config/sidekiq.yml`
|
||||
@ -279,7 +279,7 @@ If this parameter is not specified the maximum size allowed will be 2MB.
|
||||
|
||||
ADMIN_EMAIL, ADMIN_PASSWORD
|
||||
|
||||
Credentials for the first admin user created when seeding the project.
|
||||
Credentials for the first admin user created when seeding the project. (not present in application.yml because they are only used once when running the database seed with the command `rake db:seed`)
|
||||
|
||||
Settings related to Open Projects
|
||||
|
||||
|
@ -27,9 +27,6 @@ SMTP_PASSWORD:
|
||||
GA_ID: ''
|
||||
##
|
||||
|
||||
ADMIN_EMAIL: 'admin@fab-manager.com'
|
||||
ADMIN_PASSWORD: 'adminadmin'
|
||||
|
||||
DISQUS_SHORTNAME:
|
||||
|
||||
TWITTER_NAME: 'FablabGrenoble'
|
||||
|
@ -42,8 +42,6 @@ development:
|
||||
facebook_app_id: <%= ENV["FACEBOOK_APP_ID"] %>
|
||||
elaticsearch_host: <%= ENV["ELASTICSEARCH_HOST"] %>
|
||||
max_image_size: <%= ENV["MAX_IMAGE_SIZE"] %>
|
||||
admin_email: <%= ENV["ADMIN_EMAIL"] %>
|
||||
admin_password: <%= ENV["ADMIN_PASSWORD"] %>
|
||||
|
||||
test:
|
||||
secret_key_base: 83daf5e7b80d990f037407bab78dff9904aaf3c195a50f84fa8695a22287e707dfbd9524b403b1dcf116ae1d8c06844c3d7ed942564e5b46be6ae3ead93a9d30
|
||||
@ -77,8 +75,6 @@ test:
|
||||
facebook_app_id: <%= ENV["FACEBOOK_APP_ID"] %>
|
||||
elaticsearch_host: localhost
|
||||
max_image_size: <%= ENV["MAX_IMAGE_SIZE"] %>
|
||||
admin_email: <%= ENV["ADMIN_EMAIL"] %>
|
||||
admin_password: <%= ENV["ADMIN_PASSWORD"] %>
|
||||
|
||||
staging:
|
||||
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
||||
@ -117,8 +113,6 @@ staging:
|
||||
facebook_app_id: <%= ENV["FACEBOOK_APP_ID"] %>
|
||||
elaticsearch_host: <%= ENV["ELASTICSEARCH_HOST"] %>
|
||||
max_image_size: <%= ENV["MAX_IMAGE_SIZE"] %>
|
||||
admin_email: <%= ENV["ADMIN_EMAIL"] %>
|
||||
admin_password: <%= ENV["ADMIN_PASSWORD"] %>
|
||||
|
||||
# Do not keep production secrets in the repository,
|
||||
# instead read values from the environment.
|
||||
@ -159,6 +153,4 @@ production:
|
||||
log_level: <%= ENV["LOG_LEVEL"] %>
|
||||
facebook_app_id: <%= ENV["FACEBOOK_APP_ID"] %>
|
||||
elaticsearch_host: <%= ENV["ELASTICSEARCH_HOST"] %>
|
||||
max_image_size: <%= ENV["MAX_IMAGE_SIZE"] %>
|
||||
admin_email: <%= ENV["ADMIN_EMAIL"] %>
|
||||
admin_password: <%= ENV["ADMIN_PASSWORD"] %>
|
||||
max_image_size: <%= ENV["MAX_IMAGE_SIZE"] %>
|
@ -84,7 +84,7 @@ end
|
||||
|
||||
# Create the default admin if none exists yet
|
||||
if Role.where(name: 'admin').joins(:users).count === 0
|
||||
admin = User.new(username: 'admin', email: Rails.application.secrets.admin_email, password: Rails.application.secrets.admin_password, password_confirmation: Rails.application.secrets.admin_password, group_id: Group.first.id, profile_attributes: {first_name: 'admin', last_name: 'admin', gender: true, phone: '0123456789', birthday: Time.now})
|
||||
admin = User.new(username: 'admin', email: ENV["ADMIN_EMAIL"], password: ENV["ADMIN_PASSWORD"], password_confirmation: Rails.application.secrets.admin_password, group_id: Group.first.id, profile_attributes: {first_name: 'admin', last_name: 'admin', gender: true, phone: '0123456789', birthday: Time.now})
|
||||
admin.add_role 'admin'
|
||||
admin.save!
|
||||
end
|
||||
|
@ -195,7 +195,7 @@ docker run --rm \
|
||||
--link=fabmanager-postgres:postgres \
|
||||
--link=fabmanager-redis:redis \
|
||||
--link=fabmanager-elastic:elasticsearch \
|
||||
-e RAILS_ENV=production \
|
||||
-e RAILS_ENV=production ADMIN_EMAIL=youradminemail ADMIN_PASSWORD=youradminpassword \
|
||||
--env-file /home/core/fabmanager/config/env \
|
||||
-v /home/core/fabmanager/plugins:/usr/src/app/plugins \
|
||||
sleede/fab-manager \
|
||||
|
Loading…
Reference in New Issue
Block a user