-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.config.sh
30 lines (26 loc) · 1.08 KB
/
docker-compose.config.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#/bin/bash
set -eo pipefail
# Import other configs
source ./proto/grpc.config.sh
#
# Configuration file for docker compose properties, containers, variables etc.
#
export DOCKER_COMPOSE_ENV_FILE=".env"
echo "# Auto-generated .env configuration file used by docker-compose.yml" > "${DOCKER_COMPOSE_ENV_FILE}"
# Config starts here
export SERVER_CONTAINER_ID="ac-server"
export CLUSTER_SERVICE_CONTAINER_ID="ac-cluster-service"
export CLIENT_CONTAINER_ID="ac-client"
export DB_CONTAINER_ID="ac-db"
export ASTROCLUSTER_MODEL_PATH="/ac-clustering-service/finetune"
{
# Section of environment variables that are exported in this script file
echo "SERVER_CONTAINER_ID=${SERVER_CONTAINER_ID}"
echo "CLUSTER_SERVICE_CONTAINER_ID=${CLUSTER_SERVICE_CONTAINER_ID}"
echo "CLIENT_CONTAINER_ID=${CLIENT_CONTAINER_ID}"
echo "DB_CONTAINER_ID=${DB_CONTAINER_ID}"
echo "ASTROCLUSTER_MODEL_PATH=${ASTROCLUSTER_MODEL_PATH}"
# Section of environment variables that are exported elsewhere
echo "BE_GRPC_DOCKER_PATH=${BE_GRPC_DOCKER_PATH}"
} >> "${DOCKER_COMPOSE_ENV_FILE}"
echo "Generated/Overwritten .env file"