Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: "3"
- services:
- web:
- build: .
- volumes:
- - ./:/usr/src/app/
- - /usr/src/app/node_modules
- ports:
- - “3000:3000”
- depends_on:
- - postgres
- postgres:
- container_name: postgres
- build:
- context: .
- dockerfile: pgDockerfile
- environment:
- POSTGRES_PASSWORD: test
- POSTGRES_USER: test
- ports:
- - 5432:5432
- FROM postgres:9.6-alpine
- # copy init sql
- ADD 00-initial.sql /docker-entrypoint-initdb.d/
- CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
- CREATE TABLE IF NOT EXISTS test (
- id text NOT NULL,
- title varchar(200) NOT NULL
- );
- postgres | CREATE DATABASE
- postgres |
- postgres | CREATE ROLE
- postgres |
- postgres |
- postgres | /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/00-initial-data.sql
- postgres | CREATE EXTENSION
- postgres | CREATE TABLE
- postgres |
- postgres |
- postgres | LOG: received fast shutdown request
- postgres | LOG: aborting any active transactions
- postgres | waiting for server to shut down....LOG: autovacuum launcher shutting down
- postgres | LOG: shutting down
- postgres | LOG: database system is shut down
- postgres | done
- postgres | server stopped
- postgres |
- postgres | PostgreSQL init process complete; ready for start up.
- postgres |
- postgres | LOG: database system was shut down at 2017-03-22 21:36:16 UTC
- postgres | LOG: MultiXact member wraparound protections are now enabled
- postgres | LOG: database system is ready to accept connections
- postgres | LOG: autovacuum launcher started
- docker exec -it $(my postgres container id) sh
- #su - postgres
- #psql
- # d => No relations found.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement