From 10f73d876e5b99b6c0a6174b98d15df0c4bb3793 Mon Sep 17 00:00:00 2001 From: riggraz Date: Mon, 23 Sep 2019 12:14:35 +0200 Subject: [PATCH] Add .env file for docker-compose --- .env-example | 6 +++++ .gitignore | 3 +++ Dockerfile | 3 +-- app/views/layouts/_header.html.erb | 2 +- app/views/layouts/application.html.erb | 2 +- check-env.sh | 19 ++++++++++++++++ config/application.rb | 4 ++++ config/database.yml | 6 ++--- docker-compose.yml | 7 ++++++ docker-entrypoint.sh | 31 ++++++++++++++++++++++---- script/docker-run.sh | 5 +++++ script/docker-update-and-run.sh | 3 +++ script/docker-update.sh | 5 +++++ 13 files changed, 84 insertions(+), 12 deletions(-) create mode 100644 .env-example create mode 100644 check-env.sh diff --git a/.env-example b/.env-example new file mode 100644 index 00000000..db95ec67 --- /dev/null +++ b/.env-example @@ -0,0 +1,6 @@ +ENVIRONMENT=development + +POSTGRES_USER=yourusernamehere +POSTGRES_PASSWORD=yourpasswordhere + +APP_NAME="You App Name Here" \ No newline at end of file diff --git a/.gitignore b/.gitignore index a9ce452f..d2016b9b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,9 @@ # or operating system, you probably want to add a global ignore instead: # git config --global core.excludesfile '~/.gitignore_global' +# Ignore the actual contents of .env +.env + # Ignore bundler config. /.bundle diff --git a/Dockerfile b/Dockerfile index 7b8ea58e..6d79dfc3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,5 +29,4 @@ ENTRYPOINT ["/app/docker-entrypoint.sh"] EXPOSE 3000 -# Start the main process. -CMD ["foreman", "start", "-p", "3000"] +# No default CMD is provided in Dockerfile diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index f6a63b60..1ec01108 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -1,6 +1,6 @@