Version 1
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
project_root := justfile_directory()
|
||||
env_file := project_root + "/Env/.env.local"
|
||||
backend_dir := project_root + "/Backend"
|
||||
backend_bake := project_root + "/Backend/docker-bake.hcl"
|
||||
store_dir := project_root + "/Store"
|
||||
store_bake := project_root + "/Store/docker-bake.hcl"
|
||||
compose_file := project_root + "/Docker/docker-compose.remote.dev.yaml"
|
||||
|
||||
# Default flow: refresh the registry images and recreate the stack.
|
||||
rebuild: up
|
||||
|
||||
# Pull the latest remote development images from the registry.
|
||||
pull:
|
||||
docker compose --env-file '{{env_file}}' -f '{{compose_file}}' pull
|
||||
|
||||
# Start the remote development stack locally using the current registry images.
|
||||
up: pull
|
||||
docker compose --env-file '{{env_file}}' -f '{{compose_file}}' up -d --remove-orphans --force-recreate
|
||||
|
||||
# Publish the remote development images to the registry.
|
||||
push:
|
||||
set -a && source '{{env_file}}' && set +a && cd '{{backend_dir}}' && docker buildx bake -f '{{backend_bake}}' dev-image && cd '{{store_dir}}' && docker buildx bake -f '{{store_bake}}' dev-image
|
||||
|
||||
# Stop and remove the remote development stack.
|
||||
down:
|
||||
docker compose --env-file '{{env_file}}' -f '{{compose_file}}' down --remove-orphans --volumes
|
||||
|
||||
# Follow logs for the remote development stack.
|
||||
logs:
|
||||
docker compose --env-file '{{env_file}}' -f '{{compose_file}}' logs -f
|
||||
|
||||
# Restart the remote development stack.
|
||||
restart:
|
||||
docker compose --env-file '{{env_file}}' -f '{{compose_file}}' restart
|
||||
|
||||
# Show remote development stack status.
|
||||
ps:
|
||||
docker compose --env-file '{{env_file}}' -f '{{compose_file}}' ps
|
||||
@@ -0,0 +1,2 @@
|
||||
mod dev
|
||||
mod prod
|
||||
@@ -0,0 +1,37 @@
|
||||
project_root := justfile_directory()
|
||||
env_file := project_root + "/Env/.env.production"
|
||||
backend_dir := project_root + "/Backend"
|
||||
backend_bake := project_root + "/Backend/docker-bake.hcl"
|
||||
proxy_bake := project_root + "/Proxy/docker-bake.hcl"
|
||||
compose_file := project_root + "/Docker/docker-compose.remote.prod.yaml"
|
||||
|
||||
# Default flow: refresh the registry images and recreate the stack.
|
||||
rebuild: up
|
||||
|
||||
# Pull the latest remote production images from the registry.
|
||||
pull:
|
||||
docker compose --env-file '{{env_file}}' -f '{{compose_file}}' pull
|
||||
|
||||
# Start the remote production stack locally using the current registry images.
|
||||
up: pull
|
||||
docker compose --env-file '{{env_file}}' -f '{{compose_file}}' up -d --remove-orphans --force-recreate
|
||||
|
||||
# Publish the remote production images to the registry.
|
||||
push:
|
||||
set -a && source '{{env_file}}' && set +a && cd '{{backend_dir}}' && docker buildx bake -f '{{backend_bake}}' prod-image && cd '{{project_root}}' && docker buildx bake -f '{{proxy_bake}}' prod-image
|
||||
|
||||
# Stop and remove the remote production stack.
|
||||
down:
|
||||
docker compose --env-file '{{env_file}}' -f '{{compose_file}}' down --remove-orphans
|
||||
|
||||
# Follow logs for the remote production stack.
|
||||
logs:
|
||||
docker compose --env-file '{{env_file}}' -f '{{compose_file}}' logs -f
|
||||
|
||||
# Restart the remote production stack.
|
||||
restart:
|
||||
docker compose --env-file '{{env_file}}' -f '{{compose_file}}' restart
|
||||
|
||||
# Show remote production stack status.
|
||||
ps:
|
||||
docker compose --env-file '{{env_file}}' -f '{{compose_file}}' ps
|
||||
Reference in New Issue
Block a user