Setup:
$ mongo
> use pubsub
> db.createCollection('messages', { capped: true, size: 100000 })
> db.messages.insert({})
| @Bean | |
| EmbeddedServletContainerCustomizer containerCustomizer( | |
| @Value("${keystore.file}") Resource keystoreFile, | |
| @Value("${keystore.pass}") String keystorePass) throws Exception { | |
| String absoluteKeystoreFile = keystoreFile.getFile().getAbsolutePath(); | |
| return (ConfigurableEmbeddedServletContainer container) -> { | |
| if (container instanceof TomcatEmbeddedServletContainerFactory) { |
| import oracle.ons.ONS; | |
| import oracle.ons.SenderThread; | |
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; | |
| import org.springframework.util.ReflectionUtils; | |
| import javax.management.MBeanServer; | |
| import javax.management.ObjectName; | |
| import javax.servlet.ServletContextEvent; | |
| import javax.servlet.ServletContextListener; |
#Container Resource Allocation Options in docker-run You have various options for controlling resources (cpu, memory, disk) in docker. These are principally via the docker-run command options.
##Dynamic CPU Allocation
-c, --cpu-shares=0
CPU shares (relative weight, specify some numeric value which is used to allocate relative cpu share)
##Reserved CPU Allocation
Most of us won’t be able to use/deploy JDK 8 in production for a looong time. But that shouldn’t stop us from using it, right?
It should be possible to sneak in JDK 8 in the back way, the same way we snuck in Groovy and other libraries we wanted to use.
| # Generate a unique private key (KEY) | |
| sudo openssl genrsa -out mydomain.key 2048 | |
| # Generating a Certificate Signing Request (CSR) | |
| sudo openssl req -new -key mydomain.key -out mydomain.csr | |
| # Creating a Self-Signed Certificate (CRT) | |
| openssl x509 -req -days 365 -in mydomain.csr -signkey mydomain.key -out mydomain.crt | |
| # Append KEY and CRT to mydomain.pem |
| name: Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - features/** | |
| - dependabot/** | |
| pull_request: | |
| branches: |