...
 
Commits (21)
......@@ -13,3 +13,13 @@ uploads/*
yarn-error.log
data
scripts/link.sh
env/Vagrant/centos/\.vagrant/
env/Vagrant/debian/\.vagrant/
custom_package/
\.idea/
*.xz
This diff is collapsed.
......@@ -8,53 +8,37 @@ module.exports = {
},
stages: [
{
title: 'Upload',
type: 'upload',
title: 'Rédaction',
type: 'edit',
},
{
title: 'File Prep',
type: 'file_prep',
title: 'Relecture CR',
type: 'review',
},
{
title: 'Edit',
type: 'edit',
title: 'Relecture PS',
type: 'review',
},
{
title: 'Review',
title: 'Relecture PC',
type: 'review',
},
{
title: 'Clean Up',
title: 'Greffe',
type: 'clean_up',
},
{
title: 'Page Check',
type: 'page_check',
},
{
title: 'Final',
type: 'final',
},
],
divisions: [
{
name: 'Frontmatter',
showNumberBeforeComponents: [],
allowedComponentTypes: ['component'],
defaultComponentType: 'component',
},
{
name: 'Body',
showNumberBeforeComponents: ['chapter'],
allowedComponentTypes: ['chapter', 'part', 'unnumbered'],
allowedComponentTypes: ['chapter'],
defaultComponentType: 'chapter',
},
{
name: 'Backmatter',
showNumberBeforeComponents: [],
allowedComponentTypes: ['component'],
defaultComponentType: 'component',
},
],
lockTrackChangesWhenReviewing: true,
}
......@@ -14,9 +14,7 @@ describe('BookBuilder', () => {
const productionEditorBook = books[0]
cy.visit(`/books/${productionEditorBook.id}/book-builder`)
cy.contains('FRONTMATTER')
cy.contains('BODY')
cy.contains('BACKMATTER')
})
})
})
# What did I do then ?
-----------------
### "titre descriptif de l'erreur"
#####why does it happens ?
#####what to do ?
#####occurence ?
-----------------
### app would not start after linking a new custom library
#####why does it happens ?
the folder in node_modules and the one linked are identical except for their own node_modules folder, the official one had its own folder containing dependencies
#####what to do ?
run yarn install inside the linked folder to install the required dependencies that aren't available in the main project
#####occurence ?
editoria/packages/api lib 2
-----------------
### when using yarn install in the main project an error occured while building/installing the bcrypt library
#####why does it happens ?
as of june 2019, the bcrypt library need a specific node version to work properly
#####what to do ?
use n or another package manager to change nodejs to 11.15.0 (not 11.13 nor 12)
#####occurence ?
2
-----------------
......@@ -12,7 +12,7 @@ services:
- POSTGRES_PASSWORD
- POSTGRES_PORT
volumes:
- ./data/postgres:/var/lib/postgresql
- ../data/postgres:/var/lib/postgresql
- ./scripts/test.sql:/docker-entrypoint-initdb.d/test.sql
postgres_test:
......
---
- hosts: localhost, all
gather_facts: yes
become: true
environment:
PUBSWEET_SECRET: 'b023957edabe231aaaef20369b9f02adfe8d31a1752828041645d4fe6677e384641ccd949c6db438e5dee3b7d4627227db7cceaeeac20d4a3f8240b792d4d478'
POSTGRES_USER: '${USER}'
POSTGRES_PASSWORD: 'secretpassword'
POSTGRES_HOST: '0.0.0.0'
POSTGRES_DB: 'editoria_dev'
POSTGRES_PORT: '5432'
SERVER_PORT: '3000'
INK_ENDPOINT: 'http://167.99.161.30:3000/'
INK_USERNAME: 'admin@admin.com'
INK_PASSWORD: 'abc12345'
INK_EDITORIA_TYPESCRIPT: '1'
NODE_ENV: 'development'
roles:
- debian
- basics
- editoria
---
- name: "install vim"
package:
name: vim
state: present
- name: "install tmux"
package:
name: tmux
state: present
- name: "create docker group"
group:
name: docker
state: present
- name: adding the user running the deploy to group sudo
user:
name: vagrant
groups: docker
append: yes
- name: "install pip for docker-compose"
package:
name: python-pip
state: present
- name: "install docker-compose"
pip:
name: docker-compose
state: present
- name: "install n"
npm:
name: n
global: yes
- name: "update node to version 11"
shell: n 11
---
##################################
## Node & NPM For CENTOS ##
##################################
- name: "install Node"
package:
name: "{{ item }}"
state: present
with_items:
- epel-release
- nodejs
- npm
##################################
## Docker For CENTOS ##
##################################
- name: "install requirement"
package:
name: "{{ item }}"
state: present
with_items:
- yum-utils
- device-mapper-persistent-data
- lvm2
- get_url:
url: https://download.docker.com/linux/centos/docker-ce.repo
dest: /etc/yum.repos.d/docker-ce.repo
mode: 0644
- name: "install docker"
package:
name: "{{ item }}"
state: present
with_items:
- docker-ce
- docker-ce-cli
- containerd.io
\ No newline at end of file
---
# Set the version of Node.js to install ("6.x", "8.x", "10.x", "11.x", etc.).
# Version numbers from Nodesource: https://github.com/nodesource/distributions
nodejs_version: "10.x"
# The user for whom the npm packages will be installed.
# nodejs_install_npm_user: username
# The directory for global installations.
npm_config_prefix: "/usr/local/lib/npm"
# Set to true to suppress the UID/GID switching when running package scripts. If
# set explicitly to false, then installing as a non-root user will fail.
npm_config_unsafe_perm: "false"
# Define a list of global packages to be installed with NPM.
nodejs_npm_global_packages: []
# # Install a specific version of a package.
# - name: jslint
# version: 0.9.3
# # Install the latest stable release of a package.
# - name: node-sass
# # This shorthand syntax also works (same as previous example).
# - node-sass
# The path of a package.json file used to install packages globally.
nodejs_package_json_path: ""
\ No newline at end of file
---
##################################
## Node & NPM For Debian ##
##################################
- name: Ensure apt-transport-https is installed.
apt: name=apt-transport-https state=present
- name: Add Nodesource apt key.
apt_key:
url: https://keyserver.ubuntu.com/pks/lookup?op=get&fingerprint=on&search=0x1655A0AB68576280
id: "68576280"
state: present
- name: Add NodeSource repositories for Node.js.
apt_repository:
repo: "{{ item }}"
state: present
with_items:
- "deb https://deb.nodesource.com/node_{{ nodejs_version }} {{ ansible_distribution_release }} main"
- "deb-src https://deb.nodesource.com/node_{{ nodejs_version }} {{ ansible_distribution_release }} main"
register: node_repo
- name: Update apt cache if repo was added.
apt: update_cache=yes
when: node_repo.changed
- name: Ensure Node.js and npm are installed.
apt: "name=nodejs={{ nodejs_version|regex_replace('x', '') }}* state=present"
##################################
## Docker For Debian ##
##################################
- name: Ensure apt-transport-https is installed.
apt: name=apt-transport-https state=present
- name: Add Docker apt key.
apt_key:
url: https://download.docker.com/linux/debian/gpg
state: present
- name: Add Docker repositories
apt_repository:
repo: "{{ item }}"
state: present
with_items:
- "deb [arch=amd64] https://download.docker.com/linux/debian {{ ansible_distribution_release }} stable"
register: docker_repo
- name: Update apt cache if repo was added.
apt: update_cache=yes
when: docker_repo.changed
- name: "install docker"
package:
name: "{{ item }}"
state: present
with_items:
- docker-ce
- docker-ce-cli
- containerd.io
\ No newline at end of file
---
# tasks file for provision/roles/wax
- name: "install latest git version"
package:
name: "git"
state: present
- name: "install yarn"
npm:
name: "yarn"
global: yes
- name: "Install Vim"
package:
name: "vim"
state: present
- name: "install dependencies"
shell: yarn install
args:
chdir: /var/www/plume
- name: Creates directory for docker
file:
path: /var/lib/postgresql/
group: docker
state: directory
\ No newline at end of file
# -*- mode: ruby -*-
# vi: set ft=ruby :
OS = "centos/7"
OS_VERSION = "1811.01"
PROJECT_NAME = "editoria"
VB_NAME = PROJECT_NAME + "-centos"
FORWARDED_PORT = 7
SHARED_FOLDER_GUEST = "/var/www/plume"
SHARED_FOLDER_HOST = "../../../"
Vagrant.configure("2") do |config|
config.vm.hostname = PROJECT_NAME + "centos"
config.vm.define PROJECT_NAME
config.vm.provider :virtualbox do |vb|
vb.name = VB_NAME
end
config.vm.box = OS
config.vm.box_version = OS_VERSION
config.vm.network "forwarded_port", guest: 80, host: 8000+FORWARDED_PORT
config.vm.network "forwarded_port", guest: 5432, host: 5432+FORWARDED_PORT
config.vm.network "forwarded_port", guest: 3000, host: 3000+FORWARDED_PORT
config.vm.synced_folder SHARED_FOLDER_HOST, SHARED_FOLDER_GUEST
config.vm.provision "ansible_local" do |ansible|
ansible.playbook = SHARED_FOLDER_GUEST + "/env/Ansible/provision/playbook.yml"
ansible.verbose = true
end
end
# -*- mode: ruby -*-
# vi: set ft=ruby :
OS = "debian/stretch64"
OS_VERSION = "9.8.0"
PROJECT_NAME = "monemvasia"
VB_NAME = PROJECT_NAME + "-debian"
FORWARDED_PORT = 4
SHARED_FOLDER_GUEST = "/var/www/plume"
SHARED_FOLDER_HOST = "../../../"
Vagrant.configure("2") do |config|
config.vm.hostname = PROJECT_NAME
config.vm.define PROJECT_NAME
config.vm.provider :virtualbox do |vb|
vb.name = VB_NAME
end
config.vm.box = OS
config.vm.box_version = OS_VERSION
config.vm.network "forwarded_port", guest: 80, host: 8000+FORWARDED_PORT
config.vm.network "forwarded_port", guest: 5432, host: 5432+FORWARDED_PORT
config.vm.network "forwarded_port", guest: 3000, host: 3000+FORWARDED_PORT
config.vm.network "forwarded_port", guest: 3001, host: 3001+FORWARDED_PORT
config.vm.network "forwarded_port", guest: 3002, host: 3002+FORWARDED_PORT
config.vm.synced_folder SHARED_FOLDER_HOST, SHARED_FOLDER_GUEST
config.vm.synced_folder SHARED_FOLDER_HOST+"/../custom_package", SHARED_FOLDER_GUEST+"/../custom_package"
config.vm.provision "ansible_local" do |ansible|
ansible.playbook = SHARED_FOLDER_GUEST + "/env/Ansible/provision/playbook.yml"
ansible.verbose = true
end
end
cd env/Vagrant/debian/
vagrant up --provision && vagrant ssh -c "cd /var/www/plume && sh scripts/on_going/start_server_first_time.sh"
\ No newline at end of file
#!/usr/bin/env bash
cd ../custom_package/wax/packages/wax-core/
yarn link
cd -
yarn link wax-editor-core
cd ../custom_package/wax/packages/wax-react/
yarn link
cd -
yarn link wax-editor-react
cd ../custom_package/wax-prosemirror/editors/editoria
yarn link
cd -
cd ../custom_package/editoria/packages/wax
yarn link editoria
cd -
cd ../custom_package/editoria/packages/wax
yarn link
cd -
yarn link pubsweet-component-wax
cd ../custom_package/editoria/packages/dashboard
yarn link
cd -
yarn link pubsweet-component-editoria-dashboard
cd ../custom_package/editoria/packages/navigation
yarn link
cd -
yarn link pubsweet-component-editoria-navigation
cd ../custom_package/editoria/packages/bookbuilder
yarn link
cd -
yarn link pubsweet-component-bookbuilder
cd ../custom_package/editoria/packages/api
yarn link
cd -
yarn link editoria-api
\ No newline at end of file
#!/usr/bin/env bash
SESSION=$USER
# new to tmux :
# tmux allows you to create multiple session in which you can run command independently
# bonus : you can close your terminal, the session will continue on its own
# https://hackernoon.com/a-gentle-introduction-to-tmux-8d784c404340
# create new session and start servers
tmux -2 new-session -d -s $SESSION
tmux new-window -t $SESSION:1 -n 'editoria_servers'
tmux split-window -h
tmux select-pane -t 0
tmux send-keys "source config/development.env && yarn start:services" C-m
tmux select-pane -t 1
tmux send-keys "source config/development.env && yarn server" C-m
tmux a
#!/usr/bin/env bash
SESSION=$USER
# new to tmux :
# tmux allows you to create multiple session in which you can run command independently
# bonus : you can close your terminal, the session will continue on its own
# https://hackernoon.com/a-gentle-introduction-to-tmux-8d784c404340
# create new session and start servers
tmux -2 new-session -d -s $SESSION
tmux new-window -t $SESSION:1 -n 'editoria_servers'
tmux split-window -h
tmux select-pane -t 0
tmux send-keys "source config/development.env && yarn start:services" C-m
tmux select-pane -t 1
tmux send-keys "source config/development.env && yarn resetdb && yarn server" C-m
tmux a
cd env/Vagrant/debian/
vagrant up && vagrant ssh -c "cd /var/www/plume && sh scripts/on_going/start_server.sh"
\ No newline at end of file
This diff is collapsed.