Update dockerfile

This commit is contained in:
Chris Veleris 2023-11-16 11:52:52 +02:00
parent 8b14b50286
commit bd6b5fc90f
3 changed files with 7 additions and 7 deletions

View file

@ -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

View file

@ -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.

View file

@ -14,4 +14,4 @@ test:
production:
<<: *default
database: db/production.sqlite3
database: tududi_db/production.sqlite3