How to access theme config via app scripts in Shopware 6 - shopware

Is there an option to access the theme config in app scripts?
As far as I unterstand only store config and config.xml configs are accessible:
https://github.com/shopware/platform/blob/trunk/src/Core/System/SystemConfig/Facade/SystemConfigFacade.php
Does it make sense here to get access via the theme repository with:
https://github.com/shopware/platform/blob/trunk/src/Core/Framework/DataAbstractionLayer/Facade/RepositoryFacade.php ?

Yes you should access the theme config over the repository facade. There is no shorthand for that.

Related

Nodejs Environmental variables on Cpanel

I am trying to host my node and react app on godaddy.com c-panel and i don't know how to add my environmental variables. I have read that i have to add them to .HTACCESS file in public folder but it doesn't work.
this is the syntax:
SetEnv SOME_KEY "value"
Thank you
Have you read this article?
https://medium.com/#pampas93/host-your-node-js-app-on-shared-hosting-go-beyond-localhost-73ab923e6691
Go to your domain’s control panel. In most cases, it should be [domain URL]/cpanel.
After cloning the project from GitHub or sth, you can setup a node app on hosting.
Add environment variables manually in the block of Environment Variables.
I will be glad if this answer gives you some of the help.

Configuring jhipster-registry v3.0.3 with Git repo

I am trying to use the pre-packaged v3.0.3 war file for the jhipster-registry. I am launching it with these command-line properties in an attempt to point it to my Git repo for configuration info:
jhipster-registry-3.0.3.war --spring.profiles.active=prod,cust1 \
--spring.cloud.config.server.git.uri=http://myserver/url/MyConfig \
--spring.cloud.config.server.git.username=user \
--spring.cloud.config.server.git.password=pass
It starts, but I always get this error:
Your JWT secret key is not set up, you will not be able to log into the JHipster
I've tried many combinations of how to setup the Git repo. I'm using the sample application.yml file from https://github.com/jhipster/jhipster-registry-sample-config
Does the jhipster-registry itself not read any configuration files from Git?
If I want to configure the jhipster-registry properties, should I keep overriding things on the command-line, or put a yml file somewhere? It isn't clear to me the proper way to configure it when it is a pre-built war file and has embedded bootstrap/application yml files.
Is there a way to turn on debug logging so I can see what is going on?
This is because your JWT token isn't configured in your Git repository.
Have a look at our sample Git repository.
The Registry will send this token to all configured applications, and thus will be able to connect to them.
Otherwise, it shows a warning as it knows this will be an issue later.
Please note that this is a difference from the "classical" Eureka and Spring Cloud Config servers, which are not secured by default.

Enabling basic http authentication in IIS on Elastic Beanstalk?

For a demo site on Elastic Beanstalk, I'd like to enable basic authentication in IIS (not in the app, but instead have IIS handle it). I can't find how to configure IIS to do this - you don't seem to have much access to IIS configuration itself. Any tips on that appreciated, or if I'm missing the boat here.
thanks!
You need to use ebextensions to customize the server.
Create a yaml init.config file inside a folder called .ebextensions in your web application root. Set the contents as follows:
container_commands:
00-iis-features:
command: dism /online /enable-feature /featurename:IIS-BasicAuthentication
Read more about ebextensions here
Also, see my answer here https://stackoverflow.com/a/42336644/1165140 on how to modify root IIS config.
Hope this sorts you out.

Development build of my Node.js site

I have a production build of my site on a VPS, and I deploy to a bare git repo which has a hook that checkouts the commits to an app directory. I use forever to keep my app running from the app directory.
What I want to do is set up a development build which I can push to. The development build could be hosted under a subdomain on my VPS. However, I'll need an authentication step that'll prevent anyone and everyone from accessing the development site. How could I put authentication in front of an entire site with little (if any) changes to my application?
Why don't you just run it on a port that isn't available to the public and then you could create an ssh tunnel and access it via localhost?
Add a dev ssh user to your VPS and assign it a password.
Your ssh tunnel would look like this (just adjust your ports accordingly):
ssh -N -L8808:localhost:8808 user#destination.com
You'll be prompted for your password and then you would leave your terminal session open and go to your dev server via "http://localhost:8808"
Another option (something I typically do). Is to have a file checked into your repo named "config.sample.json" with configuration information (in this case your username/password [development] restriction). Then you also set up git to ignore "config.json" (so you don't accidentally commit this to your repository and have to edit files on your production deployments).
Next you would write a function that would require that config.json file and use it's configuration data if the file is found otherwise it would load up as "production".
Then you would deploy your code to your development directory and afterward rename your "config.sample.json" to "config.json" and make any edits that were needed in that file to setup debugging, access control, etc.

How should Puppet plugins be configured?

If I externalise my Puppet module config to a directory outside of Puppet by adding the modulepath / manifestdir settings:
[main]
pluginsync=true
modulepath=/home/user/project/etc/puppet/modules
manifestdir=/home/user/project/etc/puppet/manifests
the agents log the following error:
"Could not evaluate: Could not retrieve information from source(s) puppet://my-dns-name/plugins"
so looks as if they no longer seem to be able to find the Facter facts I have installed in $modulepath//lib/facter ?
If I comment out the modulepath / manifestdir settings and copy the configuration back to the /etc/puppet install directory the agents work fine.
Do I maybe need to set the pluginsource setting also and if so, where to?
Any pointers gratefully appreciated!
Are the permissions on your home directory restricted, e.g. to 0750? The puppetmaster will typically run as a dedicated puppet user rather than root, so it probably can't read a private home directory.
The other possibility is SELinux if you're using it. I'd expect that the files in your home directory aren't labeled to permit access by a puppetmaster process. Do you see any AVC denials in syslog?

Resources