Skip to content

Instantly share code, notes, and snippets.

@patientplatypus
Created September 5, 2018 18:44
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 patientplatypus/2569550f667c0bee51287149d1c49568 to your computer and use it in GitHub Desktop.
Save patientplatypus/2569550f667c0bee51287149d1c49568 to your computer and use it in GitHub Desktop.
my docker-compose file for fileserving question
version: "3"
services:
db:
restart: always
build: ./db
environment:
POSTGRES_USER: patientplatypus
POSTGRES_PASSWORD: SUPERSECRETPASSD00T
POSTGRES_DB: zennify
expose:
- "5432"
ports:
- 5432:5432
volumes:
- ./db/pgdata:/var/lib/postgresql/data
app:
restart: always
build:
context: .
dockerfile: Dockerfile
command: bash -c 'while !</dev/tcp/db/5432; do sleep 10; done; realize start --run'
# command: bash -c 'while !</dev/tcp/db/5432; do sleep 10; done; go run main.go'
ports:
- 8000:8000
depends_on:
- db
links:
- db
volumes:
- ./:/go/src/github.com/patientplatypus/webserver/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment