(gradle) Make docker image registry and tag configurable
This is to enable running an external repository for production and test. Use the ./gradle -Pdocker-registry=registry.foo.bar -Pdocker-tag=my-tag while building to accomplish this. By default, use 'marginalia' for repository and 'latest' as tag.
This commit is contained in:
parent
f58a9f46be
commit
98efb08e17
@ -10,7 +10,7 @@ x-svc: &service
|
||||
services:
|
||||
screenshot-capture-tool:
|
||||
<<: *service
|
||||
image: "marginalia.nu/screenshot-capture-tool"
|
||||
image: "marginalia/screenshot-capture-tool"
|
||||
container_name: "screenshot-capture-tool"
|
||||
networks:
|
||||
- wmsa
|
||||
|
@ -53,27 +53,27 @@ x-p2: &partition-2
|
||||
services:
|
||||
index-service-1:
|
||||
<<: *partition-1
|
||||
image: "registry.marginalia.nu/index-service"
|
||||
image: "marginalia/index-service"
|
||||
container_name: "index-service-1"
|
||||
executor-service-1:
|
||||
<<: *partition-1
|
||||
image: "registry.marginalia.nu/executor-service"
|
||||
image: "marginalia/executor-service"
|
||||
container_name: "executor-service-1"
|
||||
index-service-2:
|
||||
<<: *partition-2
|
||||
image: "registry.marginalia.nu/index-service"
|
||||
image: "marginalia/index-service"
|
||||
container_name: "index-service-2"
|
||||
executor-service-2:
|
||||
<<: *partition-2
|
||||
image: "registry.marginalia.nu/executor-service"
|
||||
image: "marginalia/executor-service"
|
||||
container_name: "executor-service-2"
|
||||
query-service:
|
||||
<<: *service
|
||||
image: "registry.marginalia.nu/query-service"
|
||||
image: "marginalia/query-service"
|
||||
container_name: "query-service"
|
||||
search-service:
|
||||
<<: *service
|
||||
image: "registry.marginalia.nu/search-service"
|
||||
image: "marginalia/search-service"
|
||||
container_name: "search-service"
|
||||
expose:
|
||||
- 80
|
||||
@ -87,7 +87,7 @@ services:
|
||||
- "traefik.http.middlewares.add-public.addprefix.prefix=/public"
|
||||
assistant-service:
|
||||
<<: *service
|
||||
image: "registry.marginalia.nu/assistant-service"
|
||||
image: "marginalia/assistant-service"
|
||||
container_name: "assistant-service"
|
||||
expose:
|
||||
- 80
|
||||
@ -105,7 +105,7 @@ services:
|
||||
- "traefik.http.middlewares.add-public.addprefix.prefix=/public"
|
||||
api-service:
|
||||
<<: *service
|
||||
image: "registry.marginalia.nu/api-service"
|
||||
image: "marginalia/api-service"
|
||||
container_name: "api-service"
|
||||
expose:
|
||||
- "80"
|
||||
@ -119,7 +119,7 @@ services:
|
||||
- "traefik.http.middlewares.add-public.addprefix.prefix=/public"
|
||||
dating-service:
|
||||
<<: *service
|
||||
image: "registry.marginalia.nu/dating-service"
|
||||
image: "marginalia/dating-service"
|
||||
container_name: "dating-service"
|
||||
expose:
|
||||
- 80
|
||||
@ -133,7 +133,7 @@ services:
|
||||
- "traefik.http.middlewares.add-public.addprefix.prefix=/public"
|
||||
explorer-service:
|
||||
<<: *service
|
||||
image: "registry.marginalia.nu/explorer-service"
|
||||
image: "marginalia/explorer-service"
|
||||
container_name: "explorer-service"
|
||||
expose:
|
||||
- 80
|
||||
@ -147,7 +147,7 @@ services:
|
||||
- "traefik.http.middlewares.add-public.addprefix.prefix=/public"
|
||||
control-service:
|
||||
<<: *service
|
||||
image: "registry.marginalia.nu/control-service"
|
||||
image: "marginalia/control-service"
|
||||
container_name: "control-service"
|
||||
expose:
|
||||
- 80
|
||||
|
@ -45,7 +45,9 @@ dockerfileZip {
|
||||
|
||||
docker {
|
||||
dockerfile = tasks.dockerFile.outputs.files.singleFile
|
||||
name = 'registry.marginalia.nu/'+application.applicationName+':latest'
|
||||
|
||||
name = (project.hasProperty('docker-registry') ? project.property('docker-registry') : 'marginalia')+'/'+application.applicationName+':'+(project.hasProperty('docker-tag') ? project.property('docker-tag') : 'latest')
|
||||
|
||||
files tasks.distTar.outputs, \
|
||||
project(':code:processes:crawling-process').distTar.outputs, \
|
||||
project(':code:processes:loading-process').distTar.outputs, \
|
||||
@ -53,8 +55,6 @@ docker {
|
||||
project(':code:processes:index-constructor-process').distTar.outputs, \
|
||||
project(':code:processes:website-adjacencies-calculator').distTar.outputs
|
||||
|
||||
tags 'latest'
|
||||
|
||||
dependsOn project(':code:processes:crawling-process').distTar
|
||||
dependsOn project(':code:processes:loading-process').distTar
|
||||
dependsOn project(':code:processes:converting-process').distTar
|
||||
|
@ -34,8 +34,8 @@ dockerfileZip {
|
||||
|
||||
docker {
|
||||
dockerfile = tasks.dockerFile.outputs.files.singleFile
|
||||
name = 'registry.marginalia.nu/'+application.applicationName+':latest'
|
||||
|
||||
name = (project.hasProperty('docker-registry') ? project.property('docker-registry') : 'marginalia')+'/'+application.applicationName+':' + (project.hasProperty('docker-tag') ? project.property('docker-tag') : 'latest')
|
||||
files tasks.distTar.outputs
|
||||
tags 'latest'
|
||||
dependsOn tasks.distTar
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user