Add container names and healthcheck to Docker Compose configuration
This commit is contained in:
parent
04a6212cd7
commit
dcc0057f6e
1 changed files with 5 additions and 0 deletions
|
@ -1,11 +1,13 @@
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
|
container_name: linkwarden-db
|
||||||
image: postgres:17-alpine
|
image: postgres:17-alpine
|
||||||
env_file: stack.env
|
env_file: stack.env
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- /docker/linkwarden/pgdata:/var/lib/postgresql/data
|
- /docker/linkwarden/pgdata:/var/lib/postgresql/data
|
||||||
linkwarden:
|
linkwarden:
|
||||||
|
container_name: linkwarden
|
||||||
env_file: stack.env
|
env_file: stack.env
|
||||||
environment:
|
environment:
|
||||||
- DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgres:5432/postgres
|
- DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgres:5432/postgres
|
||||||
|
@ -16,10 +18,13 @@ services:
|
||||||
- ${PORT-3000}:${PORT-3000}
|
- ${PORT-3000}:${PORT-3000}
|
||||||
volumes:
|
volumes:
|
||||||
- /docker/linkwarden/data:/data/data
|
- /docker/linkwarden/data:/data/data
|
||||||
|
healthcheck:
|
||||||
|
test: ["/usr/bin/curl", "--silent", "--fail", "http://localhost:${PORT-3000}/"]
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
- meilisearch
|
- meilisearch
|
||||||
meilisearch:
|
meilisearch:
|
||||||
|
container_name: linkwarden-meilisearch
|
||||||
image: getmeili/meilisearch:v1.14
|
image: getmeili/meilisearch:v1.14
|
||||||
restart: always
|
restart: always
|
||||||
env_file:
|
env_file:
|
||||||
|
|
Reference in a new issue