Skip to content

Commit

Permalink
Working on getting views and assets to properly reneder again (still
Browse files Browse the repository at this point in the history
broken)
  • Loading branch information
joshfng committed Sep 8, 2024
1 parent c042476 commit 8a6ab74
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 47 deletions.
1 change: 1 addition & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
DATABASE_URL="postgres://postgres:postgres@db/detonate_development"
LOCKBOX_MASTER_KEY=0000000000000000000000000000000000000000000000000000000000000000
RAILS_ENV=development
REDIS_URL="redis://redis:6379/0"
1 change: 1 addition & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
DATABASE_URL="postgres://postgres:postgres@db/detonate_test"
LOCKBOX_MASTER_KEY=0000000000000000000000000000000000000000000000000000000000000000
RAILS_ENV=test
REDIS_URL="redis://redis:6379/2"
2 changes: 0 additions & 2 deletions app/controllers/home_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,5 @@ class HomeController < ApplicationController

def index
return redirect_to(switches_path) if current_user

render 'index', layout: 'home'
end
end
2 changes: 1 addition & 1 deletion app/views/home/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<!-- <p>This service is offered for free in the hope that others can find value in it. If you're in journalism, or any field where your life may be at risk due to the information you know, this service helps to provide insurance that others know too, should the worst happen.</p>
<p style="display: inline-block">
<a class="btn btn-primary btn-lg" href="/users/sign_up" role="button">Sign Up ✅</a>
</p> -->
</p> -->
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/_footer.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<footer class="footer">
<div class="container">
<span class="text-muted">Made with ❤️ by <a href="https://github.com/joshfng" target="_blank">Josh Frye</a></span> | <span class="text-muted">Code on <a href="https://github.com/detonateapp/detonate" target="_blank">GitHub</a></span>
<span class="text-muted">Made with ❤️ by <a href="https://github.com/joshfng" target="_blank">joshfng</a></span> | <span class="text-muted">Code on <a href="https://github.com/joshfng/detonate" target="_blank">GitHub</a></span>
</div>
</footer>
17 changes: 3 additions & 14 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,7 @@
<%= content_for?(:content) ? yield(:content) : yield %>
</div>
</main>
</body>

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-FP609D0TT5"></script>
<script>
window.dataLayer = window.dataLayer || [];

function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());

gtag('config', 'G-FP609D0TT5');
</script>
</html>
<%= render 'layouts/footer' %>
</body>
</html>
26 changes: 0 additions & 26 deletions app/views/layouts/home.html.erb

This file was deleted.

3 changes: 2 additions & 1 deletion config/initializers/lockbox.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true

Lockbox.master_key = Rails.application.credentials.lockbox[:master_key]
# Lockbox.master_key = Rails.application.credentials.lockbox[:master_key]
Lockbox.master_key = ENV['LOCKBOX_MASTER_KEY']
4 changes: 2 additions & 2 deletions config/webpacker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ development:
# Reference: https://webpack.js.org/configuration/dev-server/
dev_server:
https: false
host: localhost
host: 0.0.0.0
port: 3035
public: localhost:3035
public: 0.0.0.0:3035
hmr: false
# Inline should be set to true if using HMR
inline: true
Expand Down
2 changes: 2 additions & 0 deletions dev-docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ echo "Environment: $RAILS_ENV"
# Check if we need to install new gems
bundle check || bundle install --jobs 20 --retry 5

yarn install

# Remove pre-existing puma/passenger server.pid
rm -f $APP_PATH/tmp/pids/server.pid || true

Expand Down
20 changes: 20 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,26 @@ services:
- redis
restart: "always"

# webpack:
# container_name: webpack
# build:
# context: .
# dockerfile: Dockerfile.dev
# volumes:
# - .:/var/app
# - shared_data:/var/shared
# - gem_cache:/usr/local/bundle/gems
# networks:
# - development
# ports:
# - 3035:3035
# stdin_open: true
# tty: true
# env_file: .env.development
# entrypoint: dev-entrypoint.sh
# command: ["./bin/webpack-dev-server"]
# restart: "always"

worker:
container_name: worker
build:
Expand Down

0 comments on commit 8a6ab74

Please sign in to comment.