forked from DefactoSoftware/Hours
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add documentation for getting set up to use Docker
Added a section to the README documenting how to get started using Docker and set up a `bin/docker_setup` script to make this easier. I've made modifications to the /config/database.yml.example so that it can simply be copied over and it will work for either development set up.
- Loading branch information
1 parent
a9640d4
commit 57dd700
Showing
4 changed files
with
43 additions
and
2 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env sh | ||
|
||
# Exit if any subcommand fails | ||
set -e | ||
|
||
# Set up database.yml | ||
if [ ! -f config/database.yml ]; then | ||
cp config/database.yml.example config/database.yml | ||
fi | ||
|
||
# Set up configurable environment variables | ||
if [ ! -f .env ]; then | ||
cp .sample.env .env | ||
echo "POSTGRES_HOST=db" >> .env | ||
echo "POSTGRES_USER=hours" >> .env | ||
echo "POSTGRES_PASSWORD=secure_password" >> .env | ||
fi |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,6 @@ services: | |
volumes: | ||
- .:/usr/src/app | ||
ports: | ||
- "8080:8080" | ||
- "7000:8080" | ||
depends_on: | ||
- db |