mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-08 14:43:24 +00:00
35 lines
695 B
YAML
35 lines
695 B
YAML
name: my-links
|
|
services:
|
|
postgres:
|
|
container_name: postgres
|
|
image: postgres:16
|
|
restart: always
|
|
environment:
|
|
- POSTGRES_DB=${DB_DATABASE}
|
|
- POSTGRES_USER=${DB_USER}
|
|
- POSTGRES_PASSWORD=${DB_PASSWORD}
|
|
healthcheck:
|
|
test: ['CMD-SHELL', 'pg_isready']
|
|
volumes:
|
|
- postgres-volume:/var/lib/postgresql/data
|
|
|
|
my-links:
|
|
container_name: my-links
|
|
restart: always
|
|
build:
|
|
context: .
|
|
environment:
|
|
- DB_HOST=postgres
|
|
- HOST=0.0.0.0
|
|
env_file:
|
|
- .env
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
ports:
|
|
- ${PORT}:3333
|
|
|
|
volumes:
|
|
postgres-volume:
|
|
name: postgres-prod-my-links
|