Skip to content

Commit

Permalink
update: docker build, categorize services by repo to use COMPOSE_PROF…
Browse files Browse the repository at this point in the history
…ILES feature, for efficient build
  • Loading branch information
itaru2622 committed Jan 26, 2025
1 parent bc6f4a9 commit 4f2be12
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 31 deletions.
70 changes: 40 additions & 30 deletions docker-compose-builder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ services:
# debug for bluesky with indigo subcmds >>>
test-indigo:
image: itaru2622/bluesky-indigo-tools:${asof}
profiles: ['', 'indigo']
build:
context: ./repos/indigo/
dockerfile: Dockerfile
Expand Down Expand Up @@ -160,6 +161,7 @@ services:

opensearch:
image: itaru2622/bluesky-indigo-opensearch:${asof}
profiles: ['', 'indigo']
build:
context: ./repos/indigo/
dockerfile: cmd/palomar/Dockerfile.opensearch
Expand Down Expand Up @@ -193,16 +195,16 @@ services:
restart: always

plc:
image: itaru2622/bluesky-did-method-plc:latest
# image: itaru2622/bluesky-did-method-plc:${asof}
# build:
# context: ./repos/did-method-plc/
# dockerfile: packages/server/Dockerfile
# args:
# - http_proxy=${http_proxy}
# - https_proxy=${https_proxy}
# - no_proxy=${no_proxy}
# - JAVA_TOOL_OPTIONS=${JAVA_TOOL_OPTIONS}
image: itaru2622/bluesky-did-method-plc:${asof}
profiles: ['', 'did-method-plc']
build:
context: ./repos/did-method-plc/
dockerfile: packages/server/Dockerfile
args:
- http_proxy=${http_proxy}
- https_proxy=${https_proxy}
- no_proxy=${no_proxy}
- JAVA_TOOL_OPTIONS=${JAVA_TOOL_OPTIONS}
ports:
- 2582:2582
volumes:
Expand All @@ -229,6 +231,7 @@ services:

pds:
image: itaru2622/bluesky-atproto-pds:${asof}
profiles: ['', 'atproto']
build:
context: ./repos/atproto/
dockerfile: services/pds/Dockerfile
Expand Down Expand Up @@ -289,6 +292,7 @@ services:

bgs:
image: itaru2622/bluesky-indigo-bgs:${asof}
profiles: ['', 'indigo']
build:
context: ./repos/indigo/
dockerfile: cmd/bigsky/Dockerfile
Expand Down Expand Up @@ -329,6 +333,7 @@ services:
bsky:
# appview(api)
image: itaru2622/bluesky-atproto-bsky:${asof}
profiles: ['', 'atproto']
build:
context: ./repos/atproto/
dockerfile: services/bsky/Dockerfile
Expand Down Expand Up @@ -391,6 +396,7 @@ services:
social-app:
image: itaru2622/bluesky-social-app:${asof}
#image: itaru2622/bluesky-social-app:${asof}${DOMAIN}
profiles: ['', 'social-app']
build:
context: ./repos/social-app/
dockerfile: Dockerfile
Expand Down Expand Up @@ -421,6 +427,7 @@ services:

palomar:
image: itaru2622/bluesky-indigo-palomar:${asof}
profiles: ['', 'indigo']
build:
context: ./repos/indigo/
dockerfile: cmd/palomar/Dockerfile
Expand Down Expand Up @@ -456,16 +463,16 @@ services:
- caddy

jetstream:
#image: itaru2622/bluesky-jetstream:${asof}
image: itaru2622/bluesky-jetstream:latest
#build:
# context: ./repos/jetstream/
# dockerfile: Dockerfile
# args:
# - http_proxy=${http_proxy}
# - https_proxy=${https_proxy}
# - no_proxy=${no_proxy}
# - JAVA_TOOL_OPTIONS=${JAVA_TOOL_OPTIONS}
image: itaru2622/bluesky-jetstream:${asof}
profiles: ['', 'jetstream']
build:
context: ./repos/jetstream/
dockerfile: Dockerfile
args:
- http_proxy=${http_proxy}
- https_proxy=${https_proxy}
- no_proxy=${no_proxy}
- JAVA_TOOL_OPTIONS=${JAVA_TOOL_OPTIONS}
ports:
- 6008:6008
volumes:
Expand All @@ -486,6 +493,7 @@ services:
ozone-standalone:
# moderation-api:
image: itaru2622/bluesky-ozone:${asof}
profiles: ['', 'ozone']
build:
context: ./repos/ozone/
dockerfile: Dockerfile
Expand Down Expand Up @@ -542,6 +550,7 @@ services:
ozone:
# moderation-api:
image: itaru2622/bluesky-atproto-ozone:${asof}
profiles: ['', 'atproto']
build:
context: ./repos/atproto/
dockerfile: services/ozone/Dockerfile
Expand Down Expand Up @@ -591,6 +600,7 @@ services:

ozone-daemon:
image: itaru2622/bluesky-atproto-ozone:${asof}
profiles: ['', 'atproto']
build:
context: ./repos/atproto/
dockerfile: services/ozone/Dockerfile
Expand Down Expand Up @@ -637,16 +647,16 @@ services:
- caddy

feed-generator:
image: itaru2622/bluesky-feed-generator:latest
#image: itaru2622/bluesky-feed-generator:${asof}
#build:
# context: ./repos/feed-generator/
# dockerfile: Dockerfile
# args:
# - http_proxy=${http_proxy}
# - https_proxy=${https_proxy}
# - no_proxy=${no_proxy}
# - JAVA_TOOL_OPTIONS=${JAVA_TOOL_OPTIONS}
image: itaru2622/bluesky-feed-generator:${asof}
profiles: ['', 'feed-generator']
build:
context: ./repos/feed-generator/
dockerfile: Dockerfile
args:
- http_proxy=${http_proxy}
- https_proxy=${https_proxy}
- no_proxy=${no_proxy}
- JAVA_TOOL_OPTIONS=${JAVA_TOOL_OPTIONS}
ports:
- 2586:3000
environment:
Expand Down
3 changes: 2 additions & 1 deletion ops/docker.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
docker_network ?= bsky_${DOMAIN}
dockerCompose ?= docker compose
auto_watchlog ?= true
COMPOSE_PROFILES ?= $(shell echo ${_nrepo} | sed 's/ /,/g')

_dockerUp: _load_vars _dockerUP_network
${_envs} ${dockerCompose} -f ${f} up -d ${services}
Expand Down Expand Up @@ -44,7 +45,7 @@ _dockerUP_network:
docker-pull:
DOMAIN= asof=${asof} ${dockerCompose} -f ${f} pull
build:
DOMAIN=${DOMAIN} asof=${asof} ${dockerCompose} -f ${f} build ${services}
COMPOSE_PROFILES=${COMPOSE_PROFILES} DOMAIN=${DOMAIN} asof=${asof} ${dockerCompose} -f ${f} build ${services}

docker-start:: setupdir ${wDir}/config/caddy/Caddyfile ${wDir}/certs/root.crt ${wDir}/certs/ca-certificates.crt ${passfile} _applySdep _dockerUp
ifeq ($(auto_watchlog),true)
Expand Down

0 comments on commit 4f2be12

Please sign in to comment.