Skip to content

Commit

Permalink
Feat: Bash scripts to run locally and on prod.
Browse files Browse the repository at this point in the history
  • Loading branch information
dleclercpro committed Mar 3, 2024
1 parent c15df8b commit 8592ccb
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Scripts/run.local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ app="liquors-quiz"
release="latest"
composefile="docker-compose.local.yml"

# Get the directory containing the script
# Get and move to the directory containing the script
dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

# Fetch newer images
docker compose pull
docker compose -f $composefile pull

# Start app instance
docker compose -f $composefile up --force-recreate
15 changes: 11 additions & 4 deletions Scripts/run.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
# Get the directory containing the script
# Define constant image details
user="dleclercpro"
app="liquors-quiz"
release="latest"
composefile="docker-compose.yml"

# Get and move to the directory containing the script
dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

# Move to the root directory
cd "${dir}/.."
# Fetch newer images
docker compose -f $composefile pull

docker compose up --build
# Start app instance
docker compose -f $composefile up --force-recreate
4 changes: 2 additions & 2 deletions docker-compose.local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ services:
image: redis:latest
container_name: liquors-quiz-redis
volumes:
- data:/data
- redis:/data


volumes:
data:
redis:
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
container_name: liquors-quiz-nginx
image: dleclercpro/ssl-reverse-proxy:latest
restart: always
ports:
ports: # Comment out when getting SSL certs for the first time
- 443:443 # HTTPS
- 80:80 # HTTP
networks:
Expand Down

0 comments on commit 8592ccb

Please sign in to comment.