This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Using the latest docker-compose version as of 02/May/2017 so that | |
# we can leverage the `deploy` section with all of its properties. | |
# Using docker 17.05.0-ce-rc1 you should be able to deploy this without | |
# problems. | |
version: '3.2' | |
services: | |
# Declaring a consul-server service that is made up of 3 containers (replica=3) | |
# with endpoint-mode==dnsrr. This makes docker not create a virtual IP but just | |
# rely on dsn round-robin load-balancing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker exec -it infra_postgres_1 /bin/sh | |
/ # psql -U filla -d filladb1 | |
psql (9.6.2) | |
Type "help" for help. | |
filladb1=> CREATE TABLE films ( title varchar(40) NOT NULL ); | |
CREATE TABLE | |
filladb1=> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
postgres_1 | Success. You can now start the database server using: | |
postgres_1 | | |
postgres_1 | pg_ctl -D /var/lib/postgresql/data -l logfile start | |
postgres_1 | | |
postgres_1 | waiting for server to start....LOG: could not bind IPv6 socket: Address not available | |
postgres_1 | HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. | |
postgres_1 | LOG: database system was shut down at 2017-04-29 15:03:23 UTC | |
postgres_1 | LOG: MultiXact member wraparound protections are now enabled | |
postgres_1 | LOG: database system is ready to accept connections | |
postgres_1 | LOG: autovacuum launcher started |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make a directory `db` encapsulates your image, having | |
# a docker-compose at the same level. | |
$ tree | |
. | |
├── db | |
│ ├── Dockerfile | |
│ └── init | |
│ └── 01-filladb.sh | |
└── docker-compose.yml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Immediately exits if any error occurs during the script | |
# execution. If not set, an error could occur and the | |
# script would continue its execution. | |
set -o errexit | |
# Creating an array that defines the environment variables | |
# that must be set. This can be consumed later via arrray |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
config: { | |
// default font size for all tabs | |
fontSize: 14, | |
// font family with optional fallbacks | |
fontFamily: 'Hack, "DejaVu Sans Mono", "Lucida Console", monospace', | |
// terminal cursor background color (hex) | |
cursorColor: 'rgba(255,255,255,.4)', |
NewerOlder