mirror of
https://github.com/ENSL/ensl.org.git
synced 2025-01-27 03:30:54 +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
|
# Development
|
||||||
|
|
||||||
|
Install instructions in INSTALL.md
|
||||||
|
|
||||||
This is just random tips for development. Not a full documentation.
|
This is just random tips for development. Not a full documentation.
|
||||||
|
|
||||||
# Handy commands
|
# Handy commands
|
||||||
|
|
|
@ -13,6 +13,7 @@ RUN apt-get update && apt-get -y upgrade \
|
||||||
libxslt1-dev libxml2-dev \
|
libxslt1-dev libxml2-dev \
|
||||||
imagemagick libmagickwand-dev \
|
imagemagick libmagickwand-dev \
|
||||||
nodejs \
|
nodejs \
|
||||||
|
phantomjs \
|
||||||
firefox-esr
|
firefox-esr
|
||||||
|
|
||||||
# Separate Gemfile ADD so that `bundle install` can be cached more effectively
|
# Separate Gemfile ADD so that `bundle install` can be cached more effectively
|
||||||
|
|
1
Gemfile
1
Gemfile
|
@ -113,5 +113,6 @@ group :test do
|
||||||
end
|
end
|
||||||
|
|
||||||
group :development, :test do
|
group :development, :test do
|
||||||
|
gem 'pry-rails'
|
||||||
gem 'pry-byebug', '~> 1.3.2'
|
gem 'pry-byebug', '~> 1.3.2'
|
||||||
end
|
end
|
||||||
|
|
|
@ -294,6 +294,8 @@ GEM
|
||||||
pry-byebug (1.3.3)
|
pry-byebug (1.3.3)
|
||||||
byebug (~> 2.7)
|
byebug (~> 2.7)
|
||||||
pry (~> 0.10)
|
pry (~> 0.10)
|
||||||
|
pry-rails (0.3.9)
|
||||||
|
pry (>= 0.10.4)
|
||||||
public_suffix (4.0.3)
|
public_suffix (4.0.3)
|
||||||
puma (4.3.3)
|
puma (4.3.3)
|
||||||
nio4r (~> 2.0)
|
nio4r (~> 2.0)
|
||||||
|
@ -469,6 +471,7 @@ DEPENDENCIES
|
||||||
phantomjs
|
phantomjs
|
||||||
poltergeist
|
poltergeist
|
||||||
pry-byebug (~> 1.3.2)
|
pry-byebug (~> 1.3.2)
|
||||||
|
pry-rails
|
||||||
public_suffix
|
public_suffix
|
||||||
puma
|
puma
|
||||||
rails (~> 6.0.2.1)
|
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.
|
ENSL Website is fairly easy to run.
|
||||||
|
|
||||||
## 1. Install reverse proxy
|
## 1. Install docker and docker-compose
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
https://docs.docker.com/install/
|
https://docs.docker.com/install/
|
||||||
https://docs.docker.com/compose/install/
|
https://docs.docker.com/compose/install/
|
||||||
|
@ -20,9 +12,13 @@ Install docker + docker-compose:
|
||||||
wget -O - 'https://get.docker.com/'|bash
|
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
|
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`
|
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.
|
Finally, Start the docker containers.
|
||||||
|
|
||||||
docker-compose build
|
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.periodicalupdater
|
||||||
//= require jquery.jplayer.min
|
//= require jquery.jplayer.min
|
||||||
//= require flowplayer
|
//= require flowplayer
|
||||||
//= require tinymce-jquery
|
|
||||||
//= require yetii
|
//= require yetii
|
||||||
//= require local
|
//= require local
|
||||||
//= require shoutbox
|
//= require shoutbox
|
||||||
|
|
|
@ -17,7 +17,7 @@ $ ->
|
||||||
|
|
||||||
$select.trigger 'DOMSubtreeModified'
|
$select.trigger 'DOMSubtreeModified'
|
||||||
|
|
||||||
$('a[href=#form_submit]').click ->
|
$('a[href=\\#form_submit]').click ->
|
||||||
$(this).closest('form').submit()
|
$(this).closest('form').submit()
|
||||||
return false
|
return false
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="fields horizontal wide">
|
<div class="fields horizontal wide">
|
||||||
<h4>Content</h4>
|
<h4>Content</h4>
|
||||||
<%= f.text_area :text, :rows => 30, :cols => 80 %>
|
<%= f.text_area :text, :class => "tinymce", :rows => 30, :cols => 80 %>
|
||||||
</div>
|
</div>
|
||||||
<div class="controls inline">
|
<div class="controls inline">
|
||||||
<%= f.submit %>
|
<%= f.submit %>
|
||||||
|
|
|
@ -1,15 +1,2 @@
|
||||||
<script type="text/javascript">
|
<%= tinymce_assets %>
|
||||||
$(function() {
|
<%= tinymce :articles, :content_css => asset_path('application.scss') %>
|
||||||
$('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>
|
|
||||||
|
|
|
@ -44,5 +44,8 @@ module Ensl
|
||||||
|
|
||||||
# Version of your assets, change this if you want to expire all your assets
|
# Version of your assets, change this if you want to expire all your assets
|
||||||
config.assets.version = '1.0'
|
config.assets.version = '1.0'
|
||||||
|
|
||||||
|
# Tiny mce
|
||||||
|
config.tinymce.install = :copy
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -35,10 +35,8 @@ Ensl::Application.configure do
|
||||||
# config.threadsafe!
|
# config.threadsafe!
|
||||||
config.eager_load = false
|
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.web_console.whiny_requests = true
|
||||||
|
|
||||||
config.eager_load = false
|
config.serve_static_assets = true
|
||||||
|
|
||||||
config.assets.debug = true
|
|
||||||
end
|
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