I'm using the OpenMapTiles Docker image on a VPS, and would like to use a custom map style created with Maputnik. I've already gone through the "setup" process, so when I go to the server's address, I see a list of the styles currently available. I don't see any option to add a new style, so I was wondering if this is possible?
Just add the json style file to the default folder and restart the OpenMapTiles server.
Edit: restart might not be the best option. Try a full stop and start then.
Related
A while back I created an instance of mariadb inside a docker container on a machine running Ubuntu. I've since learned that I'll need to update some settings to keep things running smoothly, but when I created the image, I did not specify any .cnf volumes. How do I update/create a .cnf file for this image? I'm a complete newb when it comes to docker, so please spoon-feed me.
I've tried accessing the file from within the image, but there are no text editors.
The defaults of MariaDB work pretty much out of the box (container) for small instances. You should only need to change setting when problems occur.
If you have spare memory you can increase your innodb_buffer_pool_size.
With the mariadb container, you don't need to edit the .cnf files, you can just add a few options on the command line per the docs (that you should defiantly read).
Recommend using the defaults for a while, and if you encounter problems, include a new question on dba.stackexchange.com that includes show global status output and specifics on the queries that are slow (show create table TBLNAME / explain QUERY).
I would like to enable caching in ArangoDB, automatically when my app start.
I'm using docker-compose to start the whole thing but apparently there's no simple parameter to enable caching in ArangoDB official image.
According to the doc, all the files in /docker-entrypoint-initdb.d/ are executed at container start. So I added a js file with that code:
require('#arangodb/aql/cache').properties({mode: 'on'});
It is indeed executed but caching doesn't seem to be enabled (from what I see with arangosh within the container).
My app is a JS app using arangojs, so if I can do it this way, I'd be happy too.
Thanks!
According to the performance and server config docs, you can enable caching in several ways.
Your method of adding require("#arangodb/aql/cache").properties({ mode: "on" }); to a .js file in the /docker-entrypoint-initdb.d/ directory should work, but keep an eye on the logs. You may need to redirect log output with a different driver (journals, syslog, etc.) to see what's going on. Make sure to run the command via arangosh to see if it works.
If that's a bust, you might want to see if there is a way to pass parameters at runtime (such as --query.cache-mode on). Unfortunately, I don't use Docker Compose, so I can't give you direct advice here, but try something like -e QUERY.CACHE-MODE=ON
If there isn't a way to pass params, then you could modify the config file: /etc/arangodb3/arangod.conf.
And don't forget about the REST API methods for system management. You can access AQL configuration (view and alter) in the Web UI by clicking on the Support -> Rest API -> AQL.
One thing to keep in mind - I'm not sure if the caching settings are global or tied to a specific database. View the configuration on multiple databases (including _system) to test the settings.
I would like to know if it's possible to create a kind of communication between two docker container.
I've two docker containers, one for Firefox and another one for vscode. I'm looking for a solution to be able to open URL link from vscode in my running Firefox container(create a new tab as we have when we are selecting a link).
Don't know if it's possible to do that. Maybe by sharing some specific resource.
Thanks
I am not sure about the possibility but there are two scenarios:
Either you find a way/extension to make vscode call a browser over network
Mount the needed files/binaries as a volume from firefox container to vscode container to make it able call the firefox binary locally as usual in order to make it able to open the browser (not tested but might be done somehow) but it might not be able to open in the same session, so give it a try and let me know so i can update the answer.
I've created my 'first' ASP.NET Core project with Docker support in VS2017.
I build and run and viola, it 'works'. A browser is launched, it loads http://localhost:32787/api/values and returns the expected "value1","value2" response... All is good.
So now I want to start working with this animal to make it do MY will.. get rid of the valuesController and create my own new testController. On run (select the 'docker' start command) it heads for api/values again...and again. (if I change values to test in the url it works as expected. But how do I get it to STOP going to api/values I cannot find any setting that will affect this change.
launchSettings.json is the 'intuitive' place to look. There I find a setting for launchUrl, which I change, first to just api/test (just as it was api/values OOTB) ... no joy, I go ahead and add the rest of the address
so it reads: http://localhost:32787/api/value...
I do a search on the solution and in the file system and can find the word "Values" NOWHERE.
I have found other articles that get into more advanced routes and adding them to the app.UseMvc() command in the Configuration (great, I'm sure I will need to use that soon) but something, somewhere is telling this project to go to http://localhost:32787/api/values and I want to know where that is and how to change it.
Pardon if this is a duplicate but I have tried any number of google searches for things like 'change default url in asp.net core with docker' and get polluted with irrelevant articles that show me many wonderful things that I don't need to know...YET.
If you are using the latest version of VS, and you added Docker support either during, or after the solution was created, all you have to do is right-click on the project named docker-compose, choose Properties, and you can change the information there.
The default Service URL is what you need to focus on. The Launch Browser is set to Yes by default, which has little value in an API project after a short time. Change these to what you think you need. I set my Launch Browser to No, and in case I ever need it, set the Service URL to one that makes sense after doing some development.
I had a hard time finding these myself the first time I went digging.
In case you try to browse with docker and it doesn't land on desired default route, then in your launchSettings.json, just add your desired prefix to launchUrl in the Docker node. For example to make api as your default route when running docker:
"Docker": {
"commandName": "Docker",
"launchBrowser": true,
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/api"
}
I'd like to add an option to my application similar to the Skype's option "run Skype as my computer starts".
Skype doesnt't go on the "Auto start applications" of the start menu folder, I'd like to have the same effect.
Note, one answer to this question suggets to add a key here:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
but I checekd on my machine and Skype is not there, so another way is used.
Skype installs via a registry entry, but it's in HKEY_CURRENT_USER , not HKEY_LOCAL_MACHINE
This allows Skype to be installed or not on a per-user basis. Using HKLM will autostart for ALL users.
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
If you type "msconfig" into the run window and look at the startup tab you can see where "everthing" starts from in the Location column.
I don't use skype but my guess would it's in the registry in
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
You just need to add a registry entry for your app in there (and delete it if the user unticks the box)
you can use the TRegistry class to help you reading and writing to the registry.
See this question. The question is about C#, but it only involves writing a registry value. It will be easy to convert it for Delphi.
Just run msconfig and select startup tab. You'll see the applications along side the registry key used.
Oddly, when I run regedit without elevation don't see the value HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run\Skype also. But if I run it elevated then the value is there (I guess that Windows is playing registry redirection).
Best