Skip to content

Instantly share code, notes, and snippets.

@ArthurHVS
Created March 26, 2022 21:22
Show Gist options
  • Save ArthurHVS/f8e69d8f0ddb1a9cf13dfb895ccad011 to your computer and use it in GitHub Desktop.
Save ArthurHVS/f8e69d8f0ddb1a9cf13dfb895ccad011 to your computer and use it in GitHub Desktop.
version: '3'
services:
database:
image: postgres
healthcheck:
test:
[
"CMD",
"pg_isready",
"-q",
"-d",
"postgres",
"-U",
"postgres"
]
timeout: 45s
interval: 10s
retries: 10
restart: always
environment:
POSTGRES_USER: user_postgres
POSTGRES_DB: db_postgres
POSTGRES_PASSWORD: password
ports:
- '5432:5432'
volumes:
- .:/usr/src
application:
build:
context: .
dockerfile: Dockerfile
depends_on:
- database
restart: always
ports:
- '4550:4550'
volumes:
- .:/usr/src
links:
- database
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment