Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
coding-expercise/init-dev-environment.sh
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
19 lines (12 sloc)
591 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# STOP CONTAINERS | |
echo "PostgreSQL container is being stopped..." | |
docker rm -f codingexpercise-postgres || true | |
echo "Redis container is being stopped..." | |
docker rm -f codingexpercise-redis || true | |
# START CONTAINERS | |
echo "PostgreSQL container is being started..." | |
docker run --name codingexpercise-postgres -d -p 5432:5432 -e POSTGRES_PASSWORD=123qwe -e POSTGRES_USER=root -e POSTGRES_DB=codingexpercise postgres | |
echo "Redis container is being started..." | |
docker run --name codingexpercise-redis -d -p 6379:6379 redis | |
echo "All containers have been started successfully." |