Ubuntu Linux

Start here to build install Pushkin and its dependencies on Ubuntu Linux.
These instructions were created using Ubuntu 18.04 and the apt package manager. They should generalize to other Linux distributions and package managers, however.

Skip to section

Install curl

First, ensure that you have curl installed, as this will be necessary to download Node.js. If it isn't installed, you can install it using the following commands:
$ sudo apt update
$ sudo apt install curl

Install Node.js

To install the latest version of Node.js , follow these instructions at NodeSource. They are copied below for your convenience, but you should follow the link in case their instructions have changed.
$ curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
$ sudo apt install -y nodejs

Install and configure Yarn

You will next want to install the Yarn package manager. Official instructions (copied below for convenience) are available here.
$ curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
$ echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
$ sudo apt update && sudo apt install yarn
To allow Yarn to install pushkin-cli globally, run the following steps, based on this Stack Overflow solution.
Run the following:
$ yarn config set prefix ~/.yarn
$ echo 'export PATH="$PATH:`yarn global bin`"' >> ~/.bashrc
$ source ~/.bashrc

Install Yalc

Install Yalc globally.
$ yarn global add yalc
Could not load image

Install pushkin-cli

Next, install the pushkin-cli package globally.
$ yarn global add pushkin-cli
Confirm that pushkin-cli is installed by running:
$ pushkin --help
You should get a list of commands with some documentation for each.
Confirm that you have version 2.0.0 or later by running:
$ pushkin --version
and reading the output.

Install and configure Docker Engine

Next, install Docker Engine using these instructions (copied below for convenience).
$ sudo apt update
$ sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Verify the fingerprint of the key by running this command:
$ sudo apt-key fingerprint 0EBFCD88
Your output should look like this:
pub rsa4096 2017-02-22 [SCEA]
9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
uid [ unknown] Docker Release (CE deb) <[email protected]>
sub rsa4096 2017-02-22 [S]
Next, add the repository and install Docker Engine.
$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
$ sudo apt update
$ sudo apt install docker-ce docker-ce-cli containerd.io
Check that Docker Engine is installed correctly by running:
$ sudo docker run hello-world
If Docker Engine installed correctly, this should generate some output, including:
Hello from Docker!
This message shows that your installation appears to be working correctly.
Next, follow these post-installation instructions (copied below for convenience) to manage Docker as a non-root user. (You can ignore the rest of the post-installation instructions.)
$ sudo groupadd docker
$ sudo usermod -aG docker $USER
$ newgrp docker
$ docker run hello-world

Install and configure Docker Compose

Follow these instructions (copied below for convenience) to install Docker Compose.
$ sudo curl -L "https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
$ sudo chmod +x /usr/local/bin/docker-compose
$ docker-compose --version

Next steps

Great! You're all done. Head over here to build a basic Pushkin site and experiment.