Notes and step-by-step for setting up local and remote server development environments.
git remote rm origin
git remote add origin git@github.com:l00sed/[repo name].git
git push -u origin master
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/
sudo apt update && sudo apt install yarn
yarn global add ghost-cli
mkdir ghost-admin && cd ghost-admin
ghost install local
http://localhost:2368/ghost
git clone https://github.com/TryGhost/gatsby-starter-ghost.git
cd gatsby-starter-ghost
yarn install
yarn dev
http://localhost:8000
http://localhost:2368/ghost/
gatsby-starter-ghost/.ghost.json
{
"development": {
"apiUrl": "https://localhost:2368",
"contentApiKey": "[API KEY]"
}
}
localhost:8000
docker-compose.yml
version: '3'
services:
ghost:
image: ghost:latest
restart: always
depends_on:
- db
environment:
url: https://example.com
database__client: mysql
database__connection__host: db
database__connection__user: root
database__connection__password: your_database_root_password
database__connection__database: ghost
volumes:
- /opt/ghost_content:/var/lib/ghost/content
db:
image: mysql:5.7
restart: always
environment:
MYSQL_ROOT_PASSWORD: your_database_root_password
volumes:
- /opt/ghost_mysql:/var/lib/mysql
nginx:
build:
context: ./nginx
dockerfile: Dockerfile
restart: always
depends_on:
- ghost
ports:
- "80:80"
- "443:443"
volumes:
- /etc/letsencrypt/:/etc/letsencrypt/
- /usr/share/nginx/html:/usr/share/nginx/html
sudo apt install software-properties-common
sudo add-apt-repository ppa:certbot/certbot
sudo apt update
sudo apt install certbot
sudo certbot certonly --standalone -d example.com
sudo apt remove docker docker-engine docker.io
sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
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
sudo usermod -aG docker $USER
sudo curl -L https://github.com/docker/compose/releases/download/1.25.4/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose down -v --rmi all --remove-orphans
nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
~/.bashrc