SpyrosMourelatos

SpyrosMourelatos

Member Since 4 years ago

Experience Points
2
follower
Lessons Completed
3
follow
Lessons Completed
147
stars
Best Reply Awards
10
repos

54 contributions in the last year

Pinned
⚡ Software Technology
⚡ This is a preset to human readable text converter for dreadbox's typhon synth
⚡ A modern dialog library which is highly configurable and easy to style. #hubspot-open-source
⚡ XMonad™️. Widgets go brr.
Activity
Jan
16
6 days ago
started
started time in 6 days ago
Jan
10
1 week ago
Dec
27
3 weeks ago
Dec
23
4 weeks ago
started
started time in 4 weeks ago
started
started time in 4 weeks ago
Dec
21
1 month ago
Activity icon
issue

SpyrosMourelatos issue comment vendure-ecommerce/vendure

SpyrosMourelatos
SpyrosMourelatos

Global Config

Currently there is no place to store global user-configurable settings. We have the VendureConfig object, but that is static and requires a modification of the app source.

There are a class of global config settings which the administrator may need to update, such as available languages (see #49). For this we'll need a central config table in the database. There are a couple of ways to store this:

Implementation

1) A single Config entity

Let's say we have a GlobalConfig entity with the configurable properties hard-coded into it:

@Entity()
class GlobalConfig {
  @Column('simple-array')
  availableLanguages: LanguageCode[];
  
  // ... etc  
}

Additional properties could be added using the existing CustomFields mechanism. This would mean that the table columns would grow for each additional property added. Also there would be no way to see when (and by whom) an individual property was updated.

2) One entity per property

Another way to do it would be to have a ConfigSetting entity:

@Entity()
class ConfigSetting{
  @Column()
  name: string;
  
  @Column('simple-json')
  value: any;
}

This would allow finer-grained control over the settings, such as tracking when a setting was changed and by whom, and also potentially allow permissions on a per-property basis.

Comments

Reading through the above discussions, the general consensus is that:

  • Single row is simpler to work with and has the advantage of proper data types in the DB
  • Multiple rows (also named "Entity Attribute Value" or EAV) is more flexible but harder to work with in code and is "stringly typed" meaning types must be coerced after reading from the DB. Is we just JSON.stringify/parsed everything though, that would not be such a big deal.

We will go with the single row approach because:

  1. I do not foresee a huge number of global properties being needed
  2. The existing CustomFields mechanism can be used to make adding new properties very simple both on the server side and also in terms of generating forms for the admin-ui.
  3. There are plans to extend the CustomFields in various ways (access controls, validation logic etc) which would all work well for the purpose of global config too.
SpyrosMourelatos
SpyrosMourelatos

Thank you for the awesome job on this I would just like some documentation on this feature , I am totally new with vendure and I managed to edit my vendure-config.js and add a line like this : customFields: {GlobalSettings: [{ name: 'royalMailId', type: 'string' }],}, Now this custom field is visible on the admin panel and on the admin-api graphql with a query like : query{globalSettings{ customFields{royalMailId} }} Unfortunately I don't believe these info is inside the shop-api so I don't think it can be accessed via any front end request. Am I missing something ? What is the correct procedure I should follow if I want a global setting to be visible on the front end and editable from the non-developer admin?Thank you in advance :)

Dec
20
1 month ago
Activity icon
issue

SpyrosMourelatos issue habamax/vim-godot

SpyrosMourelatos
SpyrosMourelatos

neovim error while settingit up as external editor on godot

Following the steps on the last section of your readme.md titled "Setup Neovim as an external editor for Godot" I have installed neovim-remote with pip3 install neovim-remote and I configured godot to use an external editor etc. Then I am trying to open nvim on the mentioned directory with the --listen flag and an error appears on nvim : E121 undefined variable b:gitbranch Then clicking a script icon from godot fails. I have also tried to use mousepad as an external editor and it works so the fault is on nvim side.Do you have any insight? I can send any diagnostic like my nvim version my python version and os

Activity icon
issue

SpyrosMourelatos issue comment habamax/vim-godot

SpyrosMourelatos
SpyrosMourelatos

neovim error while settingit up as external editor on godot

Following the steps on the last section of your readme.md titled "Setup Neovim as an external editor for Godot" I have installed neovim-remote with pip3 install neovim-remote and I configured godot to use an external editor etc. Then I am trying to open nvim on the mentioned directory with the --listen flag and an error appears on nvim : E121 undefined variable b:gitbranch Then clicking a script icon from godot fails. I have also tried to use mousepad as an external editor and it works so the fault is on nvim side.Do you have any insight? I can send any diagnostic like my nvim version my python version and os

SpyrosMourelatos
SpyrosMourelatos

After an hour or so I fixed it instead of the commands mentioned I just run NVIM_LISTEN_ADDRESS=/tmp/nvimsocket nvim and on godot I used simply nvr

Activity icon
issue

SpyrosMourelatos issue habamax/vim-godot

SpyrosMourelatos
SpyrosMourelatos

neovim error while settingit up as external editor on godot

Following the steps on the last section of your readme.md titled "Setup Neovim as an external editor for Godot" I have installed neovim-remote with pip3 install neovim-remote and I configured godot to use an external editor etc. Then I am trying to open nvim on the mentioned directory with the --listen flag and an error appears on nvim : E121 undefined variable b:gitbranch Then clicking a script icon from godot fails, I have also tried to use mousepad as an external editor and it works so the fault is on nvim side.Do you have any insight? I can send any diagnostic like my nvim version my python version and os

started
started time in 1 month ago
started
started time in 1 month ago
Dec
7
1 month ago
Nov
22
2 months ago
Activity icon
issue

SpyrosMourelatos issue spree/spree

SpyrosMourelatos
SpyrosMourelatos

rake db:load doesn't work at all

I can not load data on my database

Context

I start a new project by the docker method :

  • ./bin/setup
  • docker-compose up
  • on the admin panel I create a product and terminate the application
  • docker-compose run web rake db:dump
  • The file db/data.yaml gets created
  • Restart the app and delete the product
  • docker-compose run web rake db:load --trace And an error appears!
[+] Running 2/0
 ⠿ Container spree_starter-main-redis-1     Running                                                                                                                      0.0s
 ⠿ Container spree_starter-main-postgres-1  Running                                                                                                                      0.0s
** Invoke db:load (first_time)
** Invoke db:schema:load (first_time)
** Invoke db:load_config (first_time)
** Invoke environment (first_time)
** Execute environment
[Scout] [11/22/21 19:45:43 +0000 970b299d6c9d (1)] INFO : Couldn't find configuration in /app/config/scout_apm.yml for environment: development. Configuration in ENV will still be applied.
** Execute db:load_config
** Invoke db:check_protected_environments (first_time)
** Invoke db:load_config
** Execute db:check_protected_environments
** Execute db:schema:load
** Invoke db:data:load (first_time)
** Invoke environment
** Execute db:data:load
rake aborted!
ActiveRecord::InvalidForeignKey: PG::ForeignKeyViolation: ERROR:  insert or update on table "spree_oauth_access_tokens" violates foreign key constraint "fk_rails_c9894c7021"
DETAIL:  Key (application_id)=(1) is not present in table "spree_oauth_applications".
/bundle/ruby/3.0.0/gems/rack-mini-profiler-2.3.3/lib/patches/db/pg.rb:110:in `exec'
/bundle/ruby/3.0.0/gems/rack-mini-profiler-2.3.3/lib/patches/db/pg.rb:110:in `async_exec'
/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/postgresql/database_statements.rb:47:in `block (2 levels) in execute'
/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/postgresql/database_statements.rb:46:in `block in execute'
/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract_adapter.rb:696:in `block (2 levels) in log'
/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract_adapter.rb:695:in `block in log'
/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract_adapter.rb:687:in `log'
/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/postgresql/database_statements.rb:45:in `execute'
/bundle/ruby/3.0.0/gems/yaml_db-0.7.0/lib/yaml_db/serialization_helper.rb:92:in `block in load_records'
/bundle/ruby/3.0.0/gems/yaml_db-0.7.0/lib/yaml_db/serialization_helper.rb:90:in `each'
/bundle/ruby/3.0.0/gems/yaml_db-0.7.0/lib/yaml_db/serialization_helper.rb:90:in `load_records'
/bundle/ruby/3.0.0/gems/yaml_db-0.7.0/lib/yaml_db/serialization_helper.rb:80:in `load_table'
/bundle/ruby/3.0.0/gems/yaml_db-0.7.0/lib/yaml_db.rb:64:in `block (2 levels) in load_documents'
/bundle/ruby/3.0.0/gems/yaml_db-0.7.0/lib/yaml_db.rb:62:in `each'
/bundle/ruby/3.0.0/gems/yaml_db-0.7.0/lib/yaml_db.rb:62:in `block in load_documents'
/usr/local/lib/ruby/3.0.0/psych.rb:562:in `block in load_stream'
/usr/local/lib/ruby/3.0.0/psych/handlers/document_stream.rb:19:in `end_document'
/usr/local/lib/ruby/3.0.0/psych.rb:456:in `parse'
/usr/local/lib/ruby/3.0.0/psych.rb:456:in `parse_stream'
/usr/local/lib/ruby/3.0.0/psych.rb:561:in `load_stream'
/bundle/ruby/3.0.0/gems/yaml_db-0.7.0/lib/yaml_db.rb:61:in `load_documents'
/bundle/ruby/3.0.0/gems/yaml_db-0.7.0/lib/yaml_db/serialization_helper.rb:63:in `block in load'
/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `block in transaction'
/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/transaction.rb:319:in `block in within_new_transaction'
/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/transaction.rb:317:in `within_new_transaction'
/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `transaction'
/bundle/ruby/3.0.0/gems/yaml_db-0.7.0/lib/yaml_db/serialization_helper.rb:62:in `load'
/bundle/ruby/3.0.0/gems/yaml_db-0.7.0/lib/yaml_db/serialization_helper.rb:37:in `load'
/bundle/ruby/3.0.0/gems/yaml_db-0.7.0/lib/yaml_db/rake_tasks.rb:13:in `data_load_task'
/bundle/ruby/3.0.0/gems/yaml_db-0.7.0/lib/tasks/yaml_db_tasks.rake:21:in `block (3 levels) in <main>'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `block in execute'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `each'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `execute'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:243:in `block in invoke_prerequisites'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:241:in `each'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:241:in `invoke_prerequisites'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:218:in `block in invoke_with_call_chain'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:160:in `invoke_task'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `each'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block in top_level'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:125:in `run_with_threads'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:110:in `top_level'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:83:in `block in run'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:80:in `run'
/bundle/ruby/3.0.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/bundle/bin/rake:29:in `load'
/bundle/bin/rake:29:in `<main>'

Caused by:
PG::ForeignKeyViolation: ERROR:  insert or update on table "spree_oauth_access_tokens" violates foreign key constraint "fk_rails_c9894c7021"
DETAIL:  Key (application_id)=(1) is not present in table "spree_oauth_applications".
/bundle/ruby/3.0.0/gems/rack-mini-profiler-2.3.3/lib/patches/db/pg.rb:110:in `exec'
/bundle/ruby/3.0.0/gems/rack-mini-profiler-2.3.3/lib/patches/db/pg.rb:110:in `async_exec'
/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/postgresql/database_statements.rb:47:in `block (2 levels) in execute'
/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/postgresql/database_statements.rb:46:in `block in execute'
/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract_adapter.rb:696:in `block (2 levels) in log'
/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract_adapter.rb:695:in `block in log'
/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract_adapter.rb:687:in `log'
/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/postgresql/database_statements.rb:45:in `execute'
/bundle/ruby/3.0.0/gems/yaml_db-0.7.0/lib/yaml_db/serialization_helper.rb:92:in `block in load_records'
/bundle/ruby/3.0.0/gems/yaml_db-0.7.0/lib/yaml_db/serialization_helper.rb:90:in `each'
/bundle/ruby/3.0.0/gems/yaml_db-0.7.0/lib/yaml_db/serialization_helper.rb:90:in `load_records'
/bundle/ruby/3.0.0/gems/yaml_db-0.7.0/lib/yaml_db/serialization_helper.rb:80:in `load_table'
/bundle/ruby/3.0.0/gems/yaml_db-0.7.0/lib/yaml_db.rb:64:in `block (2 levels) in load_documents'
/bundle/ruby/3.0.0/gems/yaml_db-0.7.0/lib/yaml_db.rb:62:in `each'
/bundle/ruby/3.0.0/gems/yaml_db-0.7.0/lib/yaml_db.rb:62:in `block in load_documents'
/usr/local/lib/ruby/3.0.0/psych.rb:562:in `block in load_stream'
/usr/local/lib/ruby/3.0.0/psych/handlers/document_stream.rb:19:in `end_document'
/usr/local/lib/ruby/3.0.0/psych.rb:456:in `parse'
/usr/local/lib/ruby/3.0.0/psych.rb:456:in `parse_stream'
/usr/local/lib/ruby/3.0.0/psych.rb:561:in `load_stream'
/bundle/ruby/3.0.0/gems/yaml_db-0.7.0/lib/yaml_db.rb:61:in `load_documents'
/bundle/ruby/3.0.0/gems/yaml_db-0.7.0/lib/yaml_db/serialization_helper.rb:63:in `block in load'
/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `block in transaction'
/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/transaction.rb:319:in `block in within_new_transaction'
/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/transaction.rb:317:in `within_new_transaction'
/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `transaction'
/bundle/ruby/3.0.0/gems/yaml_db-0.7.0/lib/yaml_db/serialization_helper.rb:62:in `load'
/bundle/ruby/3.0.0/gems/yaml_db-0.7.0/lib/yaml_db/serialization_helper.rb:37:in `load'
/bundle/ruby/3.0.0/gems/yaml_db-0.7.0/lib/yaml_db/rake_tasks.rb:13:in `data_load_task'
/bundle/ruby/3.0.0/gems/yaml_db-0.7.0/lib/tasks/yaml_db_tasks.rake:21:in `block (3 levels) in <main>'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `block in execute'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `each'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `execute'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:243:in `block in invoke_prerequisites'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:241:in `each'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:241:in `invoke_prerequisites'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:218:in `block in invoke_with_call_chain'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:160:in `invoke_task'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `each'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block in top_level'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:125:in `run_with_threads'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:110:in `top_level'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:83:in `block in run'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:80:in `run'
/bundle/ruby/3.0.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/bundle/bin/rake:29:in `load'
/bundle/bin/rake:29:in `<main>'
Tasks: TOP => db:load => db:data:load

I would expect to just load the new element on the database. I have tried quite some things with rake db commands with no resault

Your Environment

My environment is the default docker one on a fresh project.I have tried that on an Arch and an Ubuntu

Nov
19
2 months ago
Activity icon
issue

SpyrosMourelatos issue spree/spree

SpyrosMourelatos
SpyrosMourelatos

Question: Initialization problem with cloned spree project

Hi there thanks for the project. I would like to ask a question related with version controlling the project. When I am running ./bin/setup and docker-compose up on the spree starter project the server runs normally. On the other hand when I am trying to git clone a project created with the way described above the server doesn't run with docker-compose up and it needs me to reinitialize the databases.

So more specific how can we migrate the database on git?

Nov
18
2 months ago
Nov
16
2 months ago
Nov
14
2 months ago
Activity icon
issue

SpyrosMourelatos issue medusajs/medusa

SpyrosMourelatos
SpyrosMourelatos

General deploy guidance/Interest in implementing a docker image

I am afraid I have to ask another question also but I hope this one is easy, thanks again for the awesome project. I have seen the documentation about deploying a medusa app in various server environments(Heroku,Digital Ocean,Qovery) and I have also noticed the conversations on the issues #485 , #481 , #453 . I would like to ask if there is a minimal way to run a medusa production build(with PostgreSQL,Redis and any optimization available) on a typical general purpose Linux server (so just a terminal). A docker image seems a very good solution for me and I would even assign to myself to implement a docker image for your project and also to provide documentation for it. But firstly I would like some documentation about how could I manage to do this build natively on a Linux PC (I don't care about a specific distribution everything is fine). So I would expect something like :

  1. Download PostgreSQL and Redis with your package manager
  2. Open a PostgreSQL socket at local host random port
  3. Open a Redis socket at local host random port
  4. Write this configurations on medusa-config to connect with this two sockets
Nov
12
2 months ago
started
started time in 2 months ago
Activity icon
issue

SpyrosMourelatos issue medusajs/medusa

SpyrosMourelatos
SpyrosMourelatos

Initialization problem with cloned medusa project

Hi there thanks for the project. I would like to ask a question related with medusa new command. When I am running medusa new project and then using the file named project the server runs normally. On the other hand when I am trying to git clone a project created with the way described above the server doesn't run and instead medusa develop hangs on Initializing express

Successfully compiled 0 files with Babel (5ms).
info:    Using fake Redis
✔ Models initialized – 139ms
✔ Plugin models initialized – 4ms
✔ Repositories initialized – 111ms
✔ Database initialized – 935ms
✔ Services initialized – 224ms
⠋ Initializing expressexpress-session deprecated req.secret; provide secret option node_modules/@medusajs/medusa/dist/loaders/express.js:70:52
TypeError: JwtStrategy requires a secret or key
    at new JwtStrategy (/home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/passport-jwt/lib/strategy.js:45:15)
    at _callee4$ (/home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/@medusajs/medusa/dist/loaders/passport.js:83:38)
    at tryCatch (/home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/regenerator-runtime/runtime.js:63:40)
    at Generator.invoke [as _invoke] (/home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/regenerator-runtime/runtime.js:294:22)
    at Generator.next (/home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/regenerator-runtime/runtime.js:119:21)
    at asyncGeneratorStep (/home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
    at _next (/home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
    at /home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/@babel/runtime/helpers/asyncToGenerator.js:32:7
    at new Promise (<anonymous>)
    at /home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/@babel/runtime/helpers/asyncToGenerator.js:21:12
    at /home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/@medusajs/medusa/dist/loaders/passport.js:154:18
    at _callee$ (/home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/@medusajs/medusa/dist/loaders/index.js:180:45)
    at tryCatch (/home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/regenerator-runtime/runtime.js:63:40)
    at Generator.invoke [as _invoke] (/home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/regenerator-runtime/runtime.js:294:22)
    at Generator.next (/home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/regenerator-runtime/runtime.js:119:21)
    at asyncGeneratorStep (/home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
Initializing express
Activity icon
issue

SpyrosMourelatos issue comment medusajs/medusa

SpyrosMourelatos
SpyrosMourelatos

Initialization problem with cloned medusa project

Hi there thanks for the project. I would like to ask a question related with medusa new command. When I am running medusa new project and then using the file named project the server runs normally. On the other hand when I am trying to git clone a project created with the way described above the server doesn't run and instead medusa develop hangs on Initializing express

Successfully compiled 0 files with Babel (5ms).
info:    Using fake Redis
✔ Models initialized – 139ms
✔ Plugin models initialized – 4ms
✔ Repositories initialized – 111ms
✔ Database initialized – 935ms
✔ Services initialized – 224ms
⠋ Initializing expressexpress-session deprecated req.secret; provide secret option node_modules/@medusajs/medusa/dist/loaders/express.js:70:52
TypeError: JwtStrategy requires a secret or key
    at new JwtStrategy (/home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/passport-jwt/lib/strategy.js:45:15)
    at _callee4$ (/home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/@medusajs/medusa/dist/loaders/passport.js:83:38)
    at tryCatch (/home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/regenerator-runtime/runtime.js:63:40)
    at Generator.invoke [as _invoke] (/home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/regenerator-runtime/runtime.js:294:22)
    at Generator.next (/home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/regenerator-runtime/runtime.js:119:21)
    at asyncGeneratorStep (/home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
    at _next (/home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
    at /home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/@babel/runtime/helpers/asyncToGenerator.js:32:7
    at new Promise (<anonymous>)
    at /home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/@babel/runtime/helpers/asyncToGenerator.js:21:12
    at /home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/@medusajs/medusa/dist/loaders/passport.js:154:18
    at _callee$ (/home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/@medusajs/medusa/dist/loaders/index.js:180:45)
    at tryCatch (/home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/regenerator-runtime/runtime.js:63:40)
    at Generator.invoke [as _invoke] (/home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/regenerator-runtime/runtime.js:294:22)
    at Generator.next (/home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/regenerator-runtime/runtime.js:119:21)
    at asyncGeneratorStep (/home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
Initializing express
SpyrosMourelatos
SpyrosMourelatos

Thank you very much,it works. Now this makes me curious as this files needs to be secret but it's kind of underproductive to have it on gitignore. I don't know if there is an optimal solution to that except documentation.

Activity icon
issue

SpyrosMourelatos issue medusajs/medusa

SpyrosMourelatos
SpyrosMourelatos

Initialization problem with cloned medusa project

Hi there thanks for the project. I would like to ask a question related with medusa new command. When I am running medusa new project and then using the file named project the server runs normally. On the other hand when I am trying to git clone a project created with the way described above the server doesn't run and instead medusa develop hangs on Initializing express

Successfully compiled 0 files with Babel (5ms).
info:    Using fake Redis
✔ Models initialized – 139ms
✔ Plugin models initialized – 4ms
✔ Repositories initialized – 111ms
✔ Database initialized – 935ms
✔ Services initialized – 224ms
⠋ Initializing expressexpress-session deprecated req.secret; provide secret option node_modules/@medusajs/medusa/dist/loaders/express.js:70:52
TypeError: JwtStrategy requires a secret or key
    at new JwtStrategy (/home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/passport-jwt/lib/strategy.js:45:15)
    at _callee4$ (/home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/@medusajs/medusa/dist/loaders/passport.js:83:38)
    at tryCatch (/home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/regenerator-runtime/runtime.js:63:40)
    at Generator.invoke [as _invoke] (/home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/regenerator-runtime/runtime.js:294:22)
    at Generator.next (/home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/regenerator-runtime/runtime.js:119:21)
    at asyncGeneratorStep (/home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
    at _next (/home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
    at /home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/@babel/runtime/helpers/asyncToGenerator.js:32:7
    at new Promise (<anonymous>)
    at /home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/@babel/runtime/helpers/asyncToGenerator.js:21:12
    at /home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/@medusajs/medusa/dist/loaders/passport.js:154:18
    at _callee$ (/home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/@medusajs/medusa/dist/loaders/index.js:180:45)
    at tryCatch (/home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/regenerator-runtime/runtime.js:63:40)
    at Generator.invoke [as _invoke] (/home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/regenerator-runtime/runtime.js:294:22)
    at Generator.next (/home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/regenerator-runtime/runtime.js:119:21)
    at asyncGeneratorStep (/home/spy/Documents/bagWebpage/main/medusa_back_2/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
Initializing express
Previous