mirror of
https://github.com/ENSL/ensl.org.git
synced 2025-01-26 03:01:00 +00:00
Fix tinymce
Update docs Update dockerfile, fix js issue, cleanup env files
This commit is contained in:
parent
46fab90cf4
commit
c97a47ffda
12 changed files with 58 additions and 35 deletions
|
@ -1,5 +1,7 @@
|
|||
# Development
|
||||
|
||||
Install instructions in INSTALL.md
|
||||
|
||||
This is just random tips for development. Not a full documentation.
|
||||
|
||||
# Handy commands
|
||||
|
|
|
@ -13,6 +13,7 @@ RUN apt-get update && apt-get -y upgrade \
|
|||
libxslt1-dev libxml2-dev \
|
||||
imagemagick libmagickwand-dev \
|
||||
nodejs \
|
||||
phantomjs \
|
||||
firefox-esr
|
||||
|
||||
# Separate Gemfile ADD so that `bundle install` can be cached more effectively
|
||||
|
|
1
Gemfile
1
Gemfile
|
@ -113,5 +113,6 @@ group :test do
|
|||
end
|
||||
|
||||
group :development, :test do
|
||||
gem 'pry-rails'
|
||||
gem 'pry-byebug', '~> 1.3.2'
|
||||
end
|
||||
|
|
|
@ -294,6 +294,8 @@ GEM
|
|||
pry-byebug (1.3.3)
|
||||
byebug (~> 2.7)
|
||||
pry (~> 0.10)
|
||||
pry-rails (0.3.9)
|
||||
pry (>= 0.10.4)
|
||||
public_suffix (4.0.3)
|
||||
puma (4.3.3)
|
||||
nio4r (~> 2.0)
|
||||
|
@ -469,6 +471,7 @@ DEPENDENCIES
|
|||
phantomjs
|
||||
poltergeist
|
||||
pry-byebug (~> 1.3.2)
|
||||
pry-rails
|
||||
public_suffix
|
||||
puma
|
||||
rails (~> 6.0.2.1)
|
||||
|
|
32
INSTALL.md
32
INSTALL.md
|
@ -1,16 +1,8 @@
|
|||
# Production Install (Ubuntu LTS)
|
||||
# Install (Ubuntu LTS)
|
||||
|
||||
ENSL Website is fairly easy to run.
|
||||
|
||||
## 1. Install reverse proxy
|
||||
|
||||
Install apache, nginx etc. reverse proxy. It will take requests from the users and pass them to ENSL website. Sample configuration availble @ ext/nginx.
|
||||
|
||||
https://www.nginx.com/resources/wiki/start/
|
||||
|
||||
sudo apt-get install nginx
|
||||
|
||||
## 2. Install docker and docker-compose
|
||||
## 1. Install docker and docker-compose
|
||||
|
||||
https://docs.docker.com/install/
|
||||
https://docs.docker.com/compose/install/
|
||||
|
@ -20,9 +12,13 @@ Install docker + docker-compose:
|
|||
wget -O - 'https://get.docker.com/'|bash
|
||||
sudo curl -L https://github.com/docker/compose/releases/download/1.18.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
|
||||
|
||||
## 3. Install git
|
||||
## 2. Install git
|
||||
|
||||
## 4. Download ENSL website and install it
|
||||
https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
|
||||
|
||||
sudo apt-get install nginx
|
||||
|
||||
## 3. Download ENSL website and install it
|
||||
|
||||
Now create the required directories, e.g. `/srv/ensl.org`
|
||||
|
||||
|
@ -38,4 +34,14 @@ If the database does not exist, it will be created with settings from .env file
|
|||
Finally, Start the docker containers.
|
||||
|
||||
docker-compose build
|
||||
docker-compose --rm up
|
||||
docker-compose --rm up
|
||||
|
||||
## 4. Install reverse proxy
|
||||
|
||||
Install apache, nginx etc. reverse proxy. It will take requests from the users and pass them to ENSL website. Sample configuration availble @ ext/nginx.
|
||||
|
||||
https://www.nginx.com/resources/wiki/start/
|
||||
|
||||
sudo apt-get install nginx
|
||||
|
||||
*Skip this step if you are only doing development.*
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
//= require jquery.periodicalupdater
|
||||
//= require jquery.jplayer.min
|
||||
//= require flowplayer
|
||||
//= require tinymce-jquery
|
||||
//= require yetii
|
||||
//= require local
|
||||
//= require shoutbox
|
||||
|
|
|
@ -17,7 +17,7 @@ $ ->
|
|||
|
||||
$select.trigger 'DOMSubtreeModified'
|
||||
|
||||
$('a[href=#form_submit]').click ->
|
||||
$('a[href=\\#form_submit]').click ->
|
||||
$(this).closest('form').submit()
|
||||
return false
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
</div>
|
||||
<div class="fields horizontal wide">
|
||||
<h4>Content</h4>
|
||||
<%= f.text_area :text, :rows => 30, :cols => 80 %>
|
||||
<%= f.text_area :text, :class => "tinymce", :rows => 30, :cols => 80 %>
|
||||
</div>
|
||||
<div class="controls inline">
|
||||
<%= f.submit %>
|
||||
|
|
|
@ -1,15 +1,2 @@
|
|||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$('textarea').tinymce({
|
||||
mode: "textareas",
|
||||
theme: "advanced",
|
||||
plugins: "inlinepopups,contextmenu,nonbreaking,template",
|
||||
theme_advanced_buttons1: "bold,italic,blockquote,|,bullist,numlist,|,formatselect,|,link,unlink,image,|,cleanup,code",
|
||||
theme_advanced_buttons2: "",
|
||||
theme_advanced_buttons3: "",
|
||||
theme_advanced_buttons4: "",
|
||||
convert_urls: false,
|
||||
content_css: '<%= asset_path "application.css" %>'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<%= tinymce_assets %>
|
||||
<%= tinymce :articles, :content_css => asset_path('application.scss') %>
|
||||
|
|
|
@ -44,5 +44,8 @@ module Ensl
|
|||
|
||||
# Version of your assets, change this if you want to expire all your assets
|
||||
config.assets.version = '1.0'
|
||||
|
||||
# Tiny mce
|
||||
config.tinymce.install = :copy
|
||||
end
|
||||
end
|
||||
|
|
|
@ -35,10 +35,8 @@ Ensl::Application.configure do
|
|||
# config.threadsafe!
|
||||
config.eager_load = false
|
||||
|
||||
config.web_console.whitelisted_ips = '172.18.0.0/16'
|
||||
config.web_console.whitelisted_ips = '172.0.0.0/8'
|
||||
config.web_console.whiny_requests = true
|
||||
|
||||
config.eager_load = false
|
||||
|
||||
config.assets.debug = true
|
||||
config.serve_static_assets = true
|
||||
end
|
||||
|
|
23
config/tinymce.yml
Normal file
23
config/tinymce.yml
Normal file
|
@ -0,0 +1,23 @@
|
|||
default: &default
|
||||
toolbar:
|
||||
- styleselect | bold italic | undo redo
|
||||
- image | link
|
||||
plugins:
|
||||
- image
|
||||
- link
|
||||
|
||||
articles:
|
||||
<<: *default
|
||||
# mode: "textareas",
|
||||
#theme: "modern"
|
||||
plugins:
|
||||
- inlinepopups
|
||||
- contextmenu
|
||||
- nonbreaking
|
||||
- template
|
||||
# theme_advanced_buttons1: "bold,italic,blockquote,|,bullist,numlist,|,formatselect,|,link,unlink,image,|,cleanup,code",
|
||||
# theme_advanced_buttons2: "",
|
||||
# theme_advanced_buttons3: "",
|
||||
# theme_advanced_buttons4: "",
|
||||
convert_urls: false,
|
||||
# content_css: '<%= asset_path "application.css"
|
Loading…
Reference in a new issue