Skip to content

Commit

Permalink
minor readme changes and make the sign up page pretty
Browse files Browse the repository at this point in the history
  • Loading branch information
Test committed Sep 20, 2024
1 parent fedc8d6 commit b510520
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 27 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,15 @@ To get ThinkDB up and running quickly using DockerHub:
2. Run the container while ensuring SQLite database persistence and setting the `SECRET_KEY_BASE` environment variable. Remember to replace `directory_on_your_machine_for_think_db_storage` and `your_secret_key_base_here` with your actual directory path and secret key base:

```sh
# change directory_on_your_machine_for_think_db_storage & your_secret_key_base_here
docker run -d -p 3000:3000 -v directory_on_your_machine_for_think_db_storage:/app/storage -e SECRET_KEY_BASE=your_secret_key_base_here thinkthinkai/think_db:latest
# change directory_on_your_machine_for_think_db_storage
docker run -d -p 3000:3000 -v directory_on_your_machine_for_think_db_storage:/app/storage thinkthinkai/think_db:latest
```

### Security Note

It's outside the scope of this README to walk you through securing your Docker container and any web application you host within it. However, we strongly recommend that:
1. **SECRET_KEY_BASE**: This should be managed securely—preferably through Docker secrets if using Docker Swarm or Kubernetes, or via a trusted secret management solution—to ensure it’s not exposed in plaintext within your environment variables.
2. **TLS/SSL**: Always serve your web application over HTTPS using a valid TLS certificate to encrypt data transmitted over the network.
**TLS/SSL**: Always serve your web application over HTTPS using a valid TLS certificate to encrypt data transmitted over the network.
### Using Rails Outside a Container (The Harder Method)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.20-alpha
1.0.21-alpha
60 changes: 38 additions & 22 deletions app/views/devise/registrations/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,29 +1,45 @@
<h2>Sign up</h2>

<%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
<%= render "devise/shared/error_messages", resource: resource %>

<div class="field">
<%= f.label :email %><br />
<%= f.email_field :email, autofocus: true, autocomplete: "email" %>
<div class="container-fluid">
<div class="row">
<div class="col">
<h1 class="mb-4">Sign up</h1>
</div>
</div>
<div class="row">
<div class="col-sm-12 col-md-7 col-lg-6">
<div class="card">
<div class="card-body">
<%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
<%= render "devise/shared/error_messages", resource: resource %>

<div class="field">
<%= f.label :password %>
<% if @minimum_password_length %>
<em>(<%= @minimum_password_length %> characters minimum)</em>
<% end %><br />
<%= f.password_field :password, autocomplete: "new-password" %>
</div>
<div class="mb-4">
<%= f.label :email, class: "form-label" %>
<%= f.email_field :email, autofocus: true, autocomplete: "email", class: "form-control" %>
</div>

<div class="field">
<%= f.label :password_confirmation %><br />
<%= f.password_field :password_confirmation, autocomplete: "new-password" %>
</div>
<div class="mb-4">
<%= f.label :password, class: "form-label" %>
<% if @minimum_password_length %>
<em>(<%= @minimum_password_length %> characters minimum)</em>
<% end %>
<%= f.password_field :password, autocomplete: "new-password", class: "form-control" %>
</div>

<div class="mb-4">
<%= f.label :password_confirmation, class: "form-label" %>
<%= f.password_field :password_confirmation, autocomplete: "new-password", class: "form-control" %>
</div>

<div class="actions">
<%= f.submit "Sign up" %>
<%= link_to 'Log In', new_user_session_path, class: 'btn btn-primary' %>
<div class="float-end">
<%= f.submit "Sign up", class: "btn btn-primary" %>
</div>
<% end %>
</div>
</div>
</div>
<div class="col-sm-12 col-md-5 col-lg-6">
</div>
</div>
<% end %>
</div>

<%= render "devise/shared/links" %>
1 change: 1 addition & 0 deletions app/views/devise/sessions/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<%= form.check_box :remember_me, class: "form-check-input" %>
<%= form.label :remember_me, class: "form-check-label" %>
</div>
<%= link_to 'Sign Up', new_user_registration_path, class: 'btn btn-primary' %>
<div class="float-end">
<%= form.submit "Log in", class: "btn btn-primary" %>
</div>
Expand Down

0 comments on commit b510520

Please sign in to comment.