Created
February 29, 2024 13:51
-
-
Save zetxx/eb70a609a8a08540a233172ac74ea56e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.9' | |
services: | |
postgresql: | |
restart: unless-stopped | |
container_name: postgresql | |
hostname: postgresql | |
image: postgres:alpine | |
ports: | |
- '5432:5432' | |
volumes: | |
- postgresql:/var/lib/postgresql/data | |
environment: | |
POSTGRES_PASSWORD: "mysecretpassword" | |
tty: true | |
stdin_open: true | |
logging: | |
driver: "json-file" | |
options: | |
max-size: "1m" | |
max-file: "5" | |
deploy: | |
resources: | |
limits: | |
memory: '1024M' | |
healthcheck: | |
test: ["CMD-SHELL", "pg_isready"] | |
interval: 10s | |
timeout: 5s | |
retries: 5 | |
volumes: | |
postgresql: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment