Advertisement
Guest User

docker-compose.yml

a guest
May 4th, 2018
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.63 KB | None | 0 0
  1. version: '3'
  2. services:
  3.   db:
  4.     image: postgres
  5.     volumes:
  6.      - ./sql/init.sql:/docker-entrypoint-initdb.d/init.sql
  7.     ports:
  8.      - "5432:5432"
  9.     healthcheck:
  10.       test: ["CMD-SHELL", "pg_isready -U postgres"]
  11.       interval: 30s
  12.       timeout: 30s
  13.       retries: 3
  14.   app:
  15.     depends_on:
  16.      - db
  17.     links:
  18.      - db:postgres
  19.     restart: on-failure
  20.     build: .
  21.     command: go run server.go
  22.     ports:
  23.      - "7777:80"
  24.     environment:
  25.      - POSTGRES_DB=postgres
  26.       - POSTGRES_USER=postgres
  27.       - POSTGRES_PASSWORD=mynameisjeff
  28.       - DB_HOST=postgres
  29.       - DB_PORT=5432
  30.       - DEBUG=Y
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement