Commit 2c66376c authored by les's avatar les
Browse files

[doc] build

parent edebbd5b
......@@ -16,7 +16,7 @@
"2": {
"id": "2",
"title": "Debian",
"content": "Debian installation Install Node.js & yarn (from root) curl -sL https://deb.nodesource.com/setup_12.x | bash - apt-get install -y nodejs curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list apt-get update && apt-get install yarn source Install Gancio yarn add gancio --prod Setup with postgreSQL (optional as you can choose sqlite) apt-get install postgresql # Create the database su postgres -c psql postgres=# create database gancio; postgres=# create user gancio with encrypted password 'gancio'; postgres=# grant all privileges on database gancio to gancio; Create a user to run gancio from adduser gancio su gancio Launch interactive setup gancio setup --config config.json Start gancio start --config config.json Point your web browser to http://localhost:13120 or where you selected during setup. Setup nginx as a proxy To deploy gancio in production you should use something like pm2: sudo yarn global add pm2 pm2 start gancio -- --config config.json # Run this command to run your application as a service: sudo env PATH=$PATH:/usr/local/bin pm2 startup -u gancio",
"content": "Debian installation Install Node.js & yarn (from root) curl -sL https://deb.nodesource.com/setup_12.x | bash - apt-get install -y nodejs curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list apt-get update && apt-get install yarn source Install Gancio yarn add gancio --prod Setup with postgreSQL (optional as you can choose sqlite) apt-get install postgresql # Create the database su postgres -c psql postgres=# create database gancio; postgres=# create user gancio with encrypted password 'gancio'; postgres=# grant all privileges on database gancio to gancio; Create a user to run gancio from adduser gancio su gancio Launch interactive setup gancio setup --config config.json Start gancio start --config config.json Point your web browser to http://localhost:13120 or where you selected during setup. Setup nginx as a proxy To deploy gancio in production you should use something like pm2: sudo yarn global add pm2 pm2 start gancio -- --config config.json # Run this command to run your application as a service and automatically restart after a reboot: pm2 startup # read the output! sudo pm2 startup -u gancio Upgrade sudo yarn global add gancio sudo service pm2 restart",
"url": "https://gancio.org/install/debian",
"relUrl": "/install/debian"
},
......@@ -30,7 +30,7 @@
"4": {
"id": "4",
"title": "Docker",
"content": "Initial setup Use sqlite Use postgreSQL Start gancio Initial setup You do not need to clone the full repo as we distribute gancio via npm. A Dockerfile and a docker-compose.yml are the only files needed. Create a directory where everything related to gancio is stored (db, images, config) mkdir /opt/gancio cd /opt/gancio note that you can choose a different directory. Use sqlite Download docker-compose.yml and Dockerfile wget https://gancio.org/docker/Dockerfile wget https://gancio.org/docker/sqlite/docker-compose.yml Create an empty db and config (this is needed) touch config.json db.sqlite mkdir user_locale Build docker image and launch interactive setup in one step docker-compose build docker-compose run --rm gancio gancio setup --docker --db=sqlite Use postgreSQL Download docker-compose.yml and Dockerfile wget https://gancio.org/docker/Dockerfile wget https://gancio.org/docker/sqlite/docker-compose.yml Create an empty configuration (this is needed) touch config.json mkdir user_locale Build docker image and launch interactive setup in one step docker-compose build docker-compose run --rm gancio gancio setup --docker --db=postgres Start gancio Run your container docker-compose up -d Look at logs with docker-compose logs Setup nginx as a proxy Point your web browser to http://localhost:13120 or where you specified during setup and enjoy :tada: You can edit config.json file and restart the container on your needs, see Configuration for more details.",
"content": "Initial setup Use sqlite Use postgreSQL Start gancio Upgrade Initial setup You do not need to clone the full repo as we distribute gancio via npm. A Dockerfile and a docker-compose.yml are the only files needed. Create a directory where everything related to gancio is stored (db, images, config) mkdir /opt/gancio cd /opt/gancio note that you can choose a different directory. Use sqlite Download docker-compose.yml and Dockerfile wget https://gancio.org/docker/Dockerfile wget https://gancio.org/docker/sqlite/docker-compose.yml Create an empty db and config (this is needed) touch config.json db.sqlite mkdir user_locale Build docker image and launch interactive setup in one step docker-compose build docker-compose run --rm gancio gancio setup --docker --db=sqlite Use postgreSQL Download docker-compose.yml and Dockerfile wget https://gancio.org/docker/Dockerfile wget https://gancio.org/docker/sqlite/docker-compose.yml Create an empty configuration (this is needed) touch config.json mkdir user_locale Build docker image and launch interactive setup in one step docker-compose build docker-compose run --rm gancio gancio setup --docker --db=postgres Start gancio Run your container docker-compose up -d Look at logs with docker-compose logs Setup nginx as a proxy Point your web browser to http://localhost:13120 or where you specified during setup and enjoy :tada: You can edit config.json file and restart the container on your needs, see Configuration for more details. Upgrade cd /opt/gancio docker-compose up -d --no-deps --build",
"url": "https://gancio.org/install/docker",
"relUrl": "/install/docker"
},
......
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.8.6">Jekyll</generator><link href="https://gancio.org/feed.xml" rel="self" type="application/atom+xml" /><link href="https://gancio.org/" rel="alternate" type="text/html" /><updated>2019-09-25T19:08:53+02:00</updated><id>https://gancio.org/feed.xml</id><title type="html">Gancio</title><subtitle>A shared agenda for local communities</subtitle></feed>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.8.6">Jekyll</generator><link href="https://gancio.org/feed.xml" rel="self" type="application/atom+xml" /><link href="https://gancio.org/" rel="alternate" type="text/html" /><updated>2019-09-26T16:57:00+02:00</updated><id>https://gancio.org/feed.xml</id><title type="html">Gancio</title><subtitle>A shared agenda for local communities</subtitle></feed>
\ No newline at end of file
......@@ -290,7 +290,7 @@ apt-get update <span class="o">&amp;&amp;</span> apt-get <span class="nb">instal
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>yarn add gancio <span class="nt">--prod</span>
</code></pre></div> </div>
</li>
<li>Setup with postgreSQL (optional as you can choose sqlite)
<li>Setup with postgreSQL <strong>(optional as you can choose sqlite)</strong>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>apt-get <span class="nb">install </span>postgresql
<span class="c"># Create the database</span>
su postgres <span class="nt">-c</span> psql
......@@ -324,10 +324,18 @@ su gancio
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>yarn global add pm2
pm2 start gancio <span class="nt">--</span> <span class="nt">--config</span> config.json
<span class="c"># Run this command to run your application as a service:</span>
<span class="nb">sudo env </span><span class="nv">PATH</span><span class="o">=</span><span class="nv">$PATH</span>:/usr/local/bin pm2 startup <span class="nt">-u</span> gancio
<span class="c"># Run this command to run your application as a service and automatically restart after a reboot:</span>
pm2 startup <span class="c"># read the output!</span>
<span class="nb">sudo </span>pm2 startup <span class="nt">-u</span> gancio
</code></pre></div></div>
<ol>
<li>Upgrade</li>
</ol>
<p>sudo yarn global add gancio
sudo service pm2 restart</p>
</div>
......
......@@ -282,6 +282,7 @@
<li><a href="#use-sqlite" id="markdown-toc-use-sqlite">Use sqlite</a></li>
<li><a href="#use-postgresql" id="markdown-toc-use-postgresql">Use postgreSQL</a></li>
<li><a href="#start-gancio" id="markdown-toc-start-gancio">Start gancio</a></li>
<li><a href="#upgrade" id="markdown-toc-upgrade">Upgrade</a></li>
</ol>
<h2 id="initial-setup">Initial setup</h2>
......@@ -372,6 +373,12 @@ docker-compose run --rm gancio gancio setup --docker --db=postgres
<li>You can edit <code class="highlighter-rouge">config.json</code> file and restart the container on your needs, see <a href="/config">Configuration</a> for more details.</li>
</ol>
<h2 id="upgrade">Upgrade</h2>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">cd</span> /opt/gancio
docker-compose up <span class="nt">-d</span> <span class="nt">--no-deps</span> <span class="nt">--build</span>
</code></pre></div></div>
</div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment