Skip to content

Instantly share code, notes, and snippets.

@cescoferraro
Last active January 28, 2016 13:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cescoferraro/67bdfbd204bf6be658a6 to your computer and use it in GitHub Desktop.
Save cescoferraro/67bdfbd204bf6be658a6 to your computer and use it in GitHub Desktop.
docker-compose rc2
version: 2
services:
web:
build: webapp
depends_on: [postgres]
volumes:
- ${PWD}/webapp:/srv/app
- ${PWD}/webapp/supervisor/:/etc/supervisor/
postgres:
build: psql
environment:
- POSTGRES_PASSWORD=hello
- POSTGRES_DB=demo
volumes:
- psql:/var/lib/postgresql
nginx:
build: nginx
depends_on: [web]
ports:
- 9999:80
volumes:
- ${PWD}/nginx/:/etc/nginx/
- ${PWD}/webapp/app/static/:/var/www/static/
environment:
- VIRTUAL_HOST=demo.cescoferraro.xyz
volumes:
psql:
dev@desktop: ~/Code/generator_flasksupreme/demo on master [+!]
$ sudo -E docker-compose stop && sudo -E docker-compose rm -f
Going to remove demo_nginx_1, demo_web_1, demo_postgres_1
Removing demo_nginx_1 ... done
Removing demo_web_1 ... done
Removing demo_postgres_1 ... done
dev@desktop: ~/Code/generator_flasksupreme/demo on master [+!]
$ sudo -E docker-compose up
Creating demo_postgres_1
Creating demo_web_1
Creating demo_nginx_1
Attaching to demo_postgres_1, demo_web_1, demo_nginx_1
postgres_1 | The files belonging to this database system will be owned by user "postgres".
postgres_1 | This user must also own the server process.
postgres_1 |
postgres_1 | The database cluster will be initialized with locale "en_US.utf8".
postgres_1 | The default database encoding has accordingly been set to "UTF8".
postgres_1 | The default text search configuration will be set to "english".
postgres_1 |
postgres_1 | Data page checksums are disabled.
postgres_1 |
postgres_1 | fixing permissions on existing directory /var/lib/postgresql/data ... ok
postgres_1 | creating subdirectories ... ok
web_1 | 2016-01-28 13:47:41,197 CRIT Set uid to user 0
web_1 | 2016-01-28 13:47:41,211 CRIT Server 'unix_http_server' running without any HTTP authentication checking
postgres_1 | selecting default max_connections ... 100
postgres_1 | selecting default shared_buffers ... 128MB
postgres_1 | selecting dynamic shared memory implementation ... posix
postgres_1 | creating configuration files ... ok
postgres_1 | creating template1 database in /var/lib/postgresql/data/base/1 ... ok
postgres_1 | initializing pg_authid ... ok
postgres_1 | initializing dependencies ... ok
postgres_1 | creating system views ... ok
postgres_1 | loading system objects' descriptions ... ok
postgres_1 | creating collations ... ok
postgres_1 | creating conversions ... ok
postgres_1 | creating dictionaries ... ok
postgres_1 | setting privileges on built-in objects ... ok
postgres_1 | creating information schema ... ok
postgres_1 | loading PL/pgSQL server-side language ... ok
postgres_1 | vacuuming database template1 ... ok
postgres_1 | copying template1 to template0 ... ok
postgres_1 | copying template1 to postgres ... ok
postgres_1 | syncing data to disk ... ok
postgres_1 |
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 |
postgres_1 | WARNING: enabling "trust" authentication for local connections
postgres_1 | You can change this by editing pg_hba.conf or using the option -A, or
postgres_1 | --auth-local and --auth-host, the next time you run initdb.
postgres_1 | waiting for server to start....LOG: database system was shut down at 2016-01-28 13:47:41 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
web_1 | [2016-01-28 13:47:42 +0000] [14] [INFO] Starting gunicorn 19.4.5
web_1 | [2016-01-28 13:47:42 +0000] [14] [INFO] Listening at: http://0.0.0.0:8000 (14)
web_1 | [2016-01-28 13:47:42 +0000] [14] [INFO] Using worker: sync
web_1 | [2016-01-28 13:47:42 +0000] [53] [INFO] Booting worker with pid: 53
web_1 | sdfgsdf
postgres_1 | done
postgres_1 | server started
postgres_1 | CREATE DATABASE
postgres_1 |
postgres_1 | ALTER ROLE
postgres_1 |
postgres_1 |
postgres_1 | /docker-entrypoint.sh: running /docker-entrypoint-initdb.d/init.sql
postgres_1 | SET
postgres_1 | SET
postgres_1 | SET
postgres_1 | SET
postgres_1 | SET
postgres_1 | SET
postgres_1 | SET
postgres_1 | SET
postgres_1 | SET
postgres_1 | SET
postgres_1 | CREATE TABLE
postgres_1 | ALTER TABLE
postgres_1 | CREATE SEQUENCE
postgres_1 | ALTER TABLE
postgres_1 | ALTER SEQUENCE
postgres_1 | ALTER TABLE
postgres_1 | ALTER TABLE
postgres_1 |
postgres_1 |
postgres_1 | LOG: received fast shutdown request
postgres_1 | LOG: aborting any active transactions
postgres_1 | waiting for server to shut down...LOG: autovacuum launcher shutting down
postgres_1 | .LOG: shutting down
postgres_1 | LOG: database system is shut down
postgres_1 | done
postgres_1 | server stopped
postgres_1 |
postgres_1 | PostgreSQL init process complete; ready for start up.
postgres_1 |
postgres_1 | LOG: database system was shut down at 2016-01-28 13:47:43 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment