create Docker images only with development version as tag
This commit is contained in:
+4
-7
@@ -1,18 +1,15 @@
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:16.8
|
image: postgres
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_DB=kontor
|
- POSTGRES_DB=kontor
|
||||||
- POSTGRES_USER=kontor
|
- POSTGRES_USER=kontor
|
||||||
- PGUSER=kontor
|
|
||||||
- PGPASSWORD=kontor
|
|
||||||
- PGDATABASE=kontor
|
|
||||||
#- POSTGRES_PASSWORD_FILE=/run/secrets/db-password
|
#- POSTGRES_PASSWORD_FILE=/run/secrets/db-password
|
||||||
- POSTGRES_PASSWORD=kontor
|
- POSTGRES_PASSWORD=kontor
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "pg_isready", "-q"]
|
test: ["CMD-SHELL", "pg_isready", "-U", "kontor"]
|
||||||
interval: 1s
|
interval: 1s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 10
|
retries: 10
|
||||||
@@ -46,7 +43,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- mariadb-storage:/var/lib/mysql:rw
|
- mariadb-storage:/var/lib/mysql:rw
|
||||||
kontor:
|
kontor:
|
||||||
image: kontor
|
image: kontor:0.2.0-SNAPSHOT
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
- database
|
- database
|
||||||
@@ -57,7 +54,7 @@ services:
|
|||||||
postgres:
|
postgres:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
kontor-api:
|
kontor-api:
|
||||||
image: kontor-api
|
image: kontor-api:0.2.0-SNAPSHOT
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
- database
|
- database
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@ test:
|
|||||||
DB_HOST=localhost uv run pytest -v --cov --cov-report=term --cov-report=html:coverage-report
|
DB_HOST=localhost uv run pytest -v --cov --cov-report=term --cov-report=html:coverage-report
|
||||||
|
|
||||||
docker: clean
|
docker: clean
|
||||||
docker build --target=production -t kontor-api -t kontor-api:0.1.0-SNAPSHOT .
|
docker build --target=production -t kontor-api:0.2.0-SNAPSHOT .
|
||||||
|
|
||||||
dev:
|
dev:
|
||||||
MARIADB_SERVER=localhost uv run fastapi dev src/main.py --port 8008
|
MARIADB_SERVER=localhost uv run fastapi dev src/main.py --port 8008
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ bootRun {
|
|||||||
|
|
||||||
task dockerImage(type: Exec) {
|
task dockerImage(type: Exec) {
|
||||||
dependsOn(bootJar)
|
dependsOn(bootJar)
|
||||||
commandLine "docker", "build", ".", "-t", "kontor:${project.version}", "-t", "kontor"
|
commandLine "docker", "build", ".", "-t", "kontor:${project.version}"
|
||||||
}
|
}
|
||||||
|
|
||||||
vaadin {
|
vaadin {
|
||||||
|
|||||||
Reference in New Issue
Block a user