From bd6b5fc90f4016bcf7740f96d2b18bde0168ef83 Mon Sep 17 00:00:00 2001 From: Chris Veleris Date: Thu, 16 Nov 2023 11:52:52 +0200 Subject: [PATCH] Update dockerfile --- Dockerfile | 6 +++--- README.md | 6 +++--- app/config/database.yml | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 831ed87..14ac74c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,8 @@ RUN bundle config set without 'development test' && bundle install COPY . . +RUN rm -f db/development* + EXPOSE 9292 ENV RACK_ENV=production @@ -17,6 +19,4 @@ ENV RACK_ENV=production RUN mkdir -p certs && \ openssl req -x509 -newkey rsa:4096 -keyout certs/server.key -out certs/server.crt -days 365 -nodes -subj '/CN=localhost' -RUN rake db:migrate - -CMD ["puma", "-C", "app/config/puma.rb"] +CMD rake db:migrate; puma -C app/config/puma.rb diff --git a/README.md b/README.md index 6002b1a..ad581ec 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ puma -C app/config/puma.rb Pull the latest image: ```bash -docker pull chrisvel/tududi:0.5 +docker pull chrisvel/tududi:0.8 ``` In order to start the docker container you need 3 enviromental variables: @@ -112,9 +112,9 @@ TUDUDI_SESSION_SECRET -e TUDUDI_USER_EMAIL=myemail@example.com \ -e TUDUDI_USER_PASSWORD=mysecurepassword \ -e TUDUDI_SESSION_SECRET=3337c138d17ac7acefa412e5db0d7ef6540905b198cc28c5bf0d11e48807a71bdfe48d82ed0a0a6eb667c937cbdd1db3e1e6073b3148bff37f73cc6398a39671 \ - -v ~/tududi_db:/usr/src/app/db \ + -v ~/tududi_db:/usr/src/app/tududi_db \ -p 9292:9292 \ - -d chrisvel/tududi:0.5 + -d chrisvel/tududi:0.8 ``` 3. Navigate to https://localhost:9292 and fill in your email and password. diff --git a/app/config/database.yml b/app/config/database.yml index 26be58c..fed47d0 100644 --- a/app/config/database.yml +++ b/app/config/database.yml @@ -14,4 +14,4 @@ test: production: <<: *default - database: db/production.sqlite3 + database: tududi_db/production.sqlite3