Skip to content

Instantly share code, notes, and snippets.

@niklv
niklv / init_pg.sh
Created May 7, 2017 18:27
Start postgresql db in docker container for development
#!/usr/bin/env bash
db_user="project_name"
db_password="123456"
db_name="project_name"
db_port=5432
timeout=10 # wait 10 seconds
echo 'Postgresql startup script'
echo 'stop'
@niklv
niklv / Dockerfile
Last active May 10, 2016 14:35
Wildfly with postgresql connector
FROM jboss/wildfly
MAINTAINER Nikita Lvov
USER jboss
ENV POSTGRESQL_JDBC_DRIVER_VERSION 9.4-1206-jdbc42
RUN curl -O http://central.maven.org/maven2/org/postgresql/postgresql/${POSTGRESQL_JDBC_DRIVER_VERSION}/postgresql-${POSTGRESQL_JDBC_DRIVER_VERSION}.jar
@niklv
niklv / docker-compose.yml
Last active August 11, 2021 07:12
docker redmine postgresql
services:
web:
image: 'redmine:passenger'
container_name: 'redmine_web'
restart: always
ports:
- '3000:3000'
links:
- postgres
environment:
@niklv
niklv / create-docker-tls.sh
Created March 29, 2016 20:45 — forked from Stono/create-docker-tls.sh
Creating and setting up Docker for TLS
#!/bin/bash
# This script will help you setup Docker for TLS authentication.
# Run it passing in the arguement for the FQDN of your docker server
#
# For example:
# ./create-docker-tls.sh myhost.docker.com
#
# The script will also create a profile.d (if it exists) entry
# which configures your docker client to use TLS
#
@niklv
niklv / server.js
Created July 25, 2014 09:06
Mount express 3 sub-app to express 4 app.
var express = require('express');
var subapp = require('./subapp');
var app = express();
app.use('/subpath/', subapp);
//Backward compatibility Express4 to Express3, this is only works for Express3
subapp.route = subapp.mountpath;