Skip to content

Commit 9ae20ba

Browse files
committed
Merge branch 'release/6.1.0'
2 parents 9486297 + d15f66a commit 9ae20ba

File tree

3 files changed

+18
-11
lines changed

3 files changed

+18
-11
lines changed

scaffold/optional/docker-compose.linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ services:
5757
- default
5858

5959
mail:
60-
image: mailhog/mailhog
60+
image: axllent/mailpit
6161
environment:
6262
VIRTUAL_HOST: mail.${PROJECT}.${DOMAIN}
6363
ports:

scaffold/optional/docker-compose.osx.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ services:
5959
MYSQL_ROOT_PASSWORD: super-secret-password
6060

6161
mail:
62-
image: mailhog/mailhog
62+
image: axllent/mailpit
6363
network_mode: service:web
6464

6565
redis:

scaffold/required/dsh

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ if [ -f /.dockerenv ]; then
99
exit
1010
fi
1111

12+
export DOCKER_COMPOSE_COMMAND="docker-compose"
13+
14+
# Support newer version of docker that have docker compose built in
15+
if [[ ! $(which docker-compose) ]]; then
16+
DOCKER_COMPOSE_COMMAND="docker compose"
17+
fi
18+
1219
# Used as the prefix for docker networking, container naming and nginx hostname.
1320
export PROJECT=$(basename ${PWD})
1421
# docker-compose stopped stripping chars from project name in 1.21.0.
@@ -53,7 +60,7 @@ error() {
5360
# Configures environment then brings up project using docker-compose.yml file.
5461
dsh_start() {
5562
notice "Starting project containers."
56-
docker-compose -f ${DOCKER_COMPOSE_FILE} up -d
63+
${DOCKER_COMPOSE_COMMAND} -f ${DOCKER_COMPOSE_FILE} up -d
5764
export URL="http://127.0.0.1"
5865
notice "Please wait about 10 seconds for the database to settle.
5966
You can now access the site from ${URL}.
@@ -67,7 +74,7 @@ Connecting via ./dsh shell and running robo build is a common next step."
6774
dsh_shell() {
6875
dsh_start
6976

70-
docker-compose -f ${DOCKER_COMPOSE_FILE} exec \
77+
${DOCKER_COMPOSE_COMMAND} -f ${DOCKER_COMPOSE_FILE} exec \
7178
-e COLUMNS="$(tput cols)" \
7279
-e LINES="$(tput lines)" \
7380
web ${@:-./dsh_bash}
@@ -77,13 +84,13 @@ dsh_shell() {
7784
# Stops project and brings down network after disconnecting nginx proxy.
7885
dsh_stop() {
7986
notice "Stopping containers."
80-
docker-compose -f ${DOCKER_COMPOSE_FILE} stop
87+
${DOCKER_COMPOSE_COMMAND} -f ${DOCKER_COMPOSE_FILE} stop
8188
}
8289

8390
# Command: ./dsh down
8491
# Stops project, then takes down containers and removes volumes if possible.
8592
dsh_down() {
86-
docker-compose -f ${DOCKER_COMPOSE_FILE} down -v
93+
${DOCKER_COMPOSE_COMMAND} -f ${DOCKER_COMPOSE_FILE} down -v
8794
}
8895

8996
# Command: ./dsh purge
@@ -96,13 +103,13 @@ dsh_purge() {
96103
# Command: ./dsh status
97104
# Shows status information about project containers.
98105
dsh_status() {
99-
docker-compose -f ${DOCKER_COMPOSE_FILE} ps
106+
${DOCKER_COMPOSE_COMMAND} -f ${DOCKER_COMPOSE_FILE} ps
100107
}
101108

102109
# Command: ./dsh logs
103110
# Tails logs from web container.
104111
dsh_logs() {
105-
docker-compose -f ${DOCKER_COMPOSE_FILE} logs -f web
112+
${DOCKER_COMPOSE_COMMAND} -f ${DOCKER_COMPOSE_FILE} logs -f web
106113
}
107114

108115
dsh_project() {
@@ -117,9 +124,9 @@ dsh_project() {
117124
# Fetches all images used by the project.
118125
dsh_pull() {
119126
# docker-compose doesn't resolve sub-dependencies in Dockerfiles and that's ok.
120-
docker-compose -f ${DOCKER_COMPOSE_FILE} pull --ignore-pull-failures
127+
${DOCKER_COMPOSE_COMMAND} -f ${DOCKER_COMPOSE_FILE} pull --ignore-pull-failures
121128
# Check for dependent image updates with --pull before building.
122-
docker-compose -f ${DOCKER_COMPOSE_FILE} build --pull
129+
${DOCKER_COMPOSE_COMMAND} -f ${DOCKER_COMPOSE_FILE} build --pull
123130
}
124131

125132
# Command: ./dsh nfs
@@ -164,7 +171,7 @@ dsh_setup_nfs() {
164171
while ! docker ps > /dev/null 2>&1 ; do sleep 2; done
165172

166173
echo "== Stopping running docker containers..."
167-
docker-compose -f ${DOCKER_COMPOSE_FILE} down > /dev/null 2>&1
174+
${DOCKER_COMPOSE_COMMAND} -f ${DOCKER_COMPOSE_FILE} down > /dev/null 2>&1
168175
docker volume prune -f > /dev/null
169176

170177
osascript -e 'quit app "Docker"'

0 commit comments

Comments
 (0)