Skip to content

Instantly share code, notes, and snippets.

klaud klaud81

Block or report user

Report or block klaud81

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
klaud81 /
Created Feb 15, 2020 — forked from KostyaEsmukov/
Nginx configuration sample for docker

Nginx production configuration sample

This config assumes that nginx is run from docker image _/nginx.

docker commands

docker network create nginx

mkdir -p /etc/myproject/nginx
cd /etc/myproject/nginx
View Docker Best

Mistakes to Avoid: Docker Antipatterns

Whichever route you take to implementing containers, you’ll want to steer clear of common pitfalls that can undermine the efficiency of your Docker stack.

Don’t run too many processes inside a single container

The beauty of containers—and an advantage of containers over virtual machines—is that it is easy to make multiple containers interact with one another in order to compose a complete application. There is no need to run a full application inside a single container. Instead, break your application down as much as possible into discrete services, and distribute services across multiple containers. This maximizes flexibility and reliability.

Don’t install operating systems inside Docker containers

It is possible to install a complete Linux operating system inside a container. In most cases, however, this is not necessary. If your goal is to host just a single application or part of an application in the container, you need to install only the essential

View gist:a6a72922361a3786a177391951401496
View gist:676740b5e777087e670920f6695cf68e
View gist:868cb166e02229d361c66cc7cdae8919
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
<property name="driverClass" value="${db.driver}" />
<property name="jdbcUrl" value="${db.url}" />
<property name="user" value="${db.username}" />
<property name="password" value="${db.password}" />
<jdbc:initialize-database data-source="dataSource">
<jdbc:script location="classpath:config/schema.sql" />
<jdbc:script location="classpath:config/data.sql" />
View gist:ff513cf2900228300881714b59ed4c7e
View gist:78bf1f344d3cefde02aa117a923e0ecf
<property name="prefix">
<property name="suffix">
View gist:71f17b7138928f5064e31c635fa6183d
public class WelcomeService {
//Bla Bla Bla
public class WelcomeController {
private WelcomeService service;
public String welcome() {
View gist:154fb65b8fe5c604dd588b15ff1688c5
public class WelcomeController {
private WelcomeService service = new WelcomeService();
public String welcome() {
return service.retrieveWelcomeMessage();
View gist:1488362e4b07a098729a8950ea025cd2
sudo yum install libmpc-devel mpfr-devel gmp-devel
cd ~/Downloads
curl -O
tar xvfj gcc-4.9.2.tar.bz2
cd gcc-4.9.2
./configure --disable-multilib --enable-languages=c,c++
make -j 4
make install
You can’t perform that action at this time.