Skip to content

Commit

Permalink
Merge pull request #82 from WattRex/devops
Browse files Browse the repository at this point in the history
Devops
  • Loading branch information
mariuscrsn authored Dec 20, 2023
2 parents 4d14824 + 762b7cf commit 220d97a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 0 additions & 1 deletion .github/workflows/03_deploy_production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
name: Deploy cycler to PRODUCTION

on:

pull_request_review:
types:
- submitted
Expand Down
2 changes: 2 additions & 0 deletions devops/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ instance_new_cycler () {
check_sniffer "can"
check_sniffer "scpi"
export CYCLER_TARGET=cycler_prod

docker compose ${DOCKER_COMPOSE_ARGS} build --build-arg UPDATE_REQS=$(date +%s) cycler
docker compose ${DOCKER_COMPOSE_ARGS} run -d -e CSID=${1} --name wattrex_cycler_node_${1} cycler
}
Expand Down Expand Up @@ -139,6 +140,7 @@ case ${ARG1} in
# echo "Initial Deploy"
export CYCLER_TARGET=db_sync_prod
docker compose ${DOCKER_COMPOSE_ARGS} pull db_sync
docker compose ${DOCKER_COMPOSE_ARGS} pull cycler
initial_deploy
;;
"build")
Expand Down
8 changes: 4 additions & 4 deletions devops/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ services:
args:
USER: ${USER_ID}
GROUP: ${GROUP_ID}
image: robertoaldea/wattrex-cycler-node
image: robertoaldea/wattrex-cycler-node:latest
restart: no
user: ${USER_ID}:${GROUP_ID}
# user: ${USER_ID}:${GROUP_ID}
ipc: host
volumes:
- ./.cred.yaml:/cycler/devops/.cred.yaml
Expand All @@ -54,10 +54,10 @@ services:
args:
USER: ${USER_ID}
GROUP: ${GROUP_ID}
image: robertoaldea/wattrex-cycler-db-sync
image: robertoaldea/wattrex-cycler-db-sync:latest
container_name: wattrex_cycler_db_sync
restart: always
user: ${USER_ID}:${GROUP_ID}
#user: ${USER_ID}:${GROUP_ID}
ipc: host
volumes:
- ./db_sync/run_db_sync.py:/cycler/devops/db_sync/run_db_sync.py
Expand Down

0 comments on commit 220d97a

Please sign in to comment.