Skip to content

Commit

Permalink
Swirch from docker-compose to docker compose
Browse files Browse the repository at this point in the history
Docker formally made this switch a while ago. Some systems no longer have docker-compose so this formally makes
that change for OED. Comments are left in case someone is
running an older system.
  • Loading branch information
huss committed Jul 21, 2024
1 parent d1a0e3f commit 88f20d5
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ services:
# database:
# We need the database and it has to be ready for work (see healthcheck above).
# condition: service_healthy
# Lets docker-compose up work right
# Lets docker compose up work right
# If environment variable install_args is not set then it becomes blank without warning user.
command:
[
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/installOED.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ while test $# -gt 0; do
skip_db_initialize=yes
;;
"")
# Empty string so just ignore. Esp. happens if no install_args on docker-compose up.
# Empty string so just ignore. Esp. happens if no install_args on docker compose up.
shift
;;
*)
Expand Down
5 changes: 3 additions & 2 deletions src/scripts/oed.service
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ Requires=docker.service
After=docker.service

[Service]
ExecStart=/usr/bin/docker-compose up
ExecStop=/usr/bin/docker-compose down
# Modify only if your docker is located somewhere else or you have an old system with only docker-compose.
ExecStart=/usr/bin/docker compose up
ExecStop=/usr/bin/docker compose down
WorkingDirectory=/example/path/to/project/OED
Restart=always
RestartSec=10
Expand Down
4 changes: 2 additions & 2 deletions src/scripts/refreshHourlyReadingViewsCron.bash
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# The absolute path the project root directory (OED)
cd '/example/path/to/project/OED'

# The following line should NOT need to be edited except by devs.
docker-compose run --rm web npm run --silent refreshHourlyReadingViews &>> /dev/null &
# The following line should NOT need to be edited except by devs or if you have an old system with only docker-compose.
docker compose run --rm web npm run --silent refreshHourlyReadingViews &>> /dev/null &
4 changes: 2 additions & 2 deletions src/scripts/refreshReadingViewsCron.bash
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
# The absolute path the project root directory (OED)
cd '/example/path/to/project/OED'

# The following line should NOT need to be edited except by devs.
docker-compose run --rm web npm run --silent refreshReadingViews &>> /dev/null &
# The following line should NOT need to be edited except by devs or if you have an old system with only docker-compose.
docker compose run --rm web npm run --silent refreshReadingViews &>> /dev/null &
4 changes: 2 additions & 2 deletions src/scripts/sendLogEmailCron.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# The absolute path the project root directory (OED)
cd '/example/path/to/project/OED'

# The following line should NOT need to be edited except by devs.
docker-compose run --rm web npm run --silent sendLogEmail &>> /dev/null &
# The following line should NOT need to be edited except by devs or if you have an old system with only docker-compose.
docker compose run --rm web npm run --silent sendLogEmail &>> /dev/null &
4 changes: 2 additions & 2 deletions src/scripts/updateEgaugeMetersOEDCron.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# The absolute path the project root directory (OED)
cd '/example/path/to/project/OED'

# The following line should NOT need to be edited except by devs.
docker-compose run --rm web npm run --silent updateEgaugeMeters &>> /dev/null &
# The following line should NOT need to be edited except by devs or if you have an old system with only docker-compose.
docker compose run --rm web npm run --silent updateEgaugeMeters &>> /dev/null &
4 changes: 2 additions & 2 deletions src/scripts/updateMamacMetersOEDCron.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# The absolute path the project root directory (OED)
cd '/example/path/to/project/OED'

# The following line should NOT need to be edited except by devs.
docker-compose run --rm web npm run --silent updateMamacMeters &>> /dev/null &
# The following line should NOT need to be edited except by devs or if you have an old system with only docker-compose.
docker compose run --rm web npm run --silent updateMamacMeters &>> /dev/null &

0 comments on commit 88f20d5

Please sign in to comment.