mirror of
https://github.com/esauflores/databases.git
synced 2026-03-09 06:30:34 +00:00
refactor: update image naming convention in Justfile and compose.yml
This commit is contained in:
4
Justfile
4
Justfile
@@ -36,7 +36,7 @@ clean-images db=VARIANT:
|
|||||||
# Build image locally
|
# Build image locally
|
||||||
build db=VARIANT:
|
build db=VARIANT:
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
IMAGE="database-{{db}}:latest"
|
IMAGE="db-{{db}}:latest"
|
||||||
echo "docker build -f {{db}}/Dockerfile -t ${IMAGE} {{db}}"
|
echo "docker build -f {{db}}/Dockerfile -t ${IMAGE} {{db}}"
|
||||||
docker build -f {{db}}/Dockerfile -t ${IMAGE} {{db}}
|
docker build -f {{db}}/Dockerfile -t ${IMAGE} {{db}}
|
||||||
|
|
||||||
@@ -45,7 +45,7 @@ push db=VARIANT version=VERSION:
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
REGISTRY_URL='{{REGISTRY_URL}}'
|
REGISTRY_URL='{{REGISTRY_URL}}'
|
||||||
PREFIX=${REGISTRY_URL:+${REGISTRY_URL}/}
|
PREFIX=${REGISTRY_URL:+${REGISTRY_URL}/}
|
||||||
IMAGE="database-{{db}}"
|
IMAGE="db-{{db}}"
|
||||||
VERSION={{version}}
|
VERSION={{version}}
|
||||||
|
|
||||||
just build {{db}}
|
just build {{db}}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
# run `just build postgres` first
|
# run `just build postgres` first
|
||||||
image: database-postgres:latest
|
image: db-postgres:latest
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_USER: ${POSTGRES_USER:-postgres}
|
POSTGRES_USER: ${POSTGRES_USER:-postgres}
|
||||||
@@ -10,12 +10,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "${POSTGRES_PORT:-5432}:5432"
|
- "${POSTGRES_PORT:-5432}:5432"
|
||||||
volumes:
|
volumes:
|
||||||
- postgres_data:/var/lib/postgresql
|
- postgres-data:/var/lib/postgresql
|
||||||
healthcheck:
|
|
||||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"]
|
|
||||||
interval: 10s
|
|
||||||
timeout: 5s
|
|
||||||
retries: 5
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
postgres_data:
|
postgres-data:
|
||||||
|
|||||||
Reference in New Issue
Block a user