Skip to content

Commit 553f0ad

Browse files
committed
Deploy dev with provision using Makefile
1 parent fe233ca commit 553f0ad

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,10 @@ docker_dev_rebuild_admin:
237237
docker_dev_rebuild_api:
238238
docker-compose -f docker-compose-dev.yml up --force-recreate --no-deps -d --build $(API_NAME)
239239

240+
# Deploy osctrl in a single server using the provision.sh script
241+
provision_dev:
242+
./deploy/provision.sh -m prod -s /home/$(DEV_USER)/osctrl -t self -p all --nginx --postgres -E -R --tls-hostname "$(DEV_IP)" --admin-hostname "$(DEV_IP)" --api-hostname "$(DEV_IP)" -X admin
243+
240244
# Auto-format and simplify the code
241245
GOFMT_ARGS = -l -w -s
242246
gofmt-tls:

deploy/config/logger.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

deploy/provision.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ API_CONF="$API_COMPONENT.json"
144144
DB_CONF="db.json"
145145
CACHE_CONF="redis.json"
146146
JWT_CONF="jwt.json"
147-
LOGGER_CONF="logger.json"
147+
LOGGER_CONF_ADMIN="logger_admin.json"
148+
LOGGER_CONF_TLS="logger_tls.json"
148149
SERVICE_TEMPLATE="service.json"
149150
DB_TEMPLATE="db.json"
150151
CACHE_TEMPLATE="redis.json"
@@ -672,7 +673,8 @@ else
672673
configuration_cache "$SOURCE_PATH/deploy/config/$CACHE_TEMPLATE" "$DEST_PATH/config/$CACHE_CONF" "$_CACHE_HOST" "$_CACHE_PORT" "$_CACHE_PASS" "sudo"
673674

674675
# Prepare DB logger configuration for services
675-
sudo cp "$DEST_PATH/config/$DB_CONF" "$DEST_PATH/config/$LOGGER_CONF"
676+
sudo cp "$DEST_PATH/config/$DB_CONF" "$DEST_PATH/config/$LOGGER_CONF_ADMIN"
677+
sudo cp "$DEST_PATH/config/$DB_CONF" "$DEST_PATH/config/$LOGGER_CONF_TLS"
676678

677679
# JWT configuration
678680
cat "$SOURCE_PATH/deploy/config/$JWT_TEMPLATE" | sed "s|_JWT_SECRET|$_JWT_SECRET|g" | sudo tee "$DEST_PATH/config/$JWT_CONF"

0 commit comments

Comments
 (0)