mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-08 22:53:25 +00:00
57 lines
1.2 KiB
YAML
57 lines
1.2 KiB
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
|
|
ports:
|
|
- '${DB_PORT}:5432'
|
|
|
|
pgadmin:
|
|
container_name: pgadmin
|
|
image: dpage/pgadmin4:8.6
|
|
restart: always
|
|
healthcheck:
|
|
test: ['CMD', 'wget', '-O', '-', 'http://localhost:80/misc/ping']
|
|
interval: 2s
|
|
timeout: 10s
|
|
retries: 30
|
|
environment:
|
|
- PGADMIN_DEFAULT_EMAIL=myemail@gmail.com
|
|
- PGADMIN_DEFAULT_PASSWORD=a12345678
|
|
depends_on:
|
|
- postgres
|
|
volumes:
|
|
- ./docker-config/servers_pgadmin.json:/pgadmin4/servers.json
|
|
ports:
|
|
- '5050:80'
|
|
|
|
my-links:
|
|
container_name: my-links
|
|
restart: always
|
|
build:
|
|
context: .
|
|
environment:
|
|
- DB_HOST=postgres
|
|
- HOST=0.0.0.0
|
|
- NODE_ENV=production
|
|
env_file:
|
|
- .env
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
ports:
|
|
- ${PORT}:3333
|
|
|
|
volumes:
|
|
postgres-volume:
|
|
name: postgres-prod-my-links
|