Skip to content
This repository has been archived by the owner on May 13, 2022. It is now read-only.

Commit

Permalink
docker instructions enhanced
Browse files Browse the repository at this point in the history
  • Loading branch information
maehr committed Sep 6, 2018
1 parent c90e65a commit 54b5512
Showing 1 changed file with 43 additions and 16 deletions.
59 changes: 43 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# typademic

Typademic turns distraction freely written markdown files into beautiful PDFs. Built with love, [Bulma.io](https://bulma.io/), [Flask](http://flask.pocoo.org/), [Google Fonts](https://fonts.google.com/), [Pandoc](http://pandoc.org/), and [LaTeX](https://www.latex-project.org/).
Typademic turns distraction freely written markdown files into beautiful PDFs. Built with love, [Google Fonts](https://fonts.google.com/), [Pandoc](http://pandoc.org/), and [LaTeX](https://www.latex-project.org/).

[![CircleCI](https://circleci.com/gh/maehr/typademic.svg?style=svg&circle-token=f7ea42d593cc8107242a9ebd489b025c4c33328f)](https://circleci.com/gh/maehr/typademic)
[![codecov](https://codecov.io/gh/maehr/typademic/branch/master/graph/badge.svg)](https://codecov.io/gh/maehr/typademic)
Expand Down Expand Up @@ -29,17 +29,17 @@ Install all this to use all functions of typademic.
#### Mac with [Homebrew](https://brew.sh/index_de)

```bash
brew install python openssl pandoc pandoc-citeproc mactex
brew install python openssl pandoc pandoc-citeproc mactex curl
curl https://raw.githubusercontent.com/qrpike/Web-Font-Load/master/install.sh | bash
```

#### Ubuntu 18.04

```bash
sudo apt-get update -y
sudo apt-get install -y texlive-full pandoc pandoc-citeproc
sudo apt-get install -y texlive-full pandoc pandoc-citeproc curl

https://raw.githubusercontent.com/qrpike/Web-Font-Load/master/install.sh | bash
curl https://raw.githubusercontent.com/qrpike/Web-Font-Load/master/install.sh | bash

pip install --upgrade pip
```
Expand All @@ -49,9 +49,9 @@ pip install --upgrade pip
```bash
sudo add-apt-repository ppa:jonathonf/python-3.6
sudo apt-get update -y
sudo apt-get install -y python3.6 texlive-full pandoc pandoc-citeproc
sudo apt-get install -y python3.6 texlive-full pandoc pandoc-citeproc curl

https://raw.githubusercontent.com/qrpike/Web-Font-Load/master/install.sh | bash
curl https://raw.githubusercontent.com/qrpike/Web-Font-Load/master/install.sh | bash

pip install --upgrade pip
```
Expand All @@ -60,9 +60,7 @@ pip install --upgrade pip

```bash
virtualenv venv
cd venv
source bin/activate
cd ..
source venv/bin/activate
pip install -r requirements.txt
```

Expand All @@ -78,30 +76,59 @@ python app.py
python pytest
```

## Deployment
## Deployment (BEGINNER)

1. Install [Docker CE](https://www.docker.com/community-edition).

Install [Docker CE](https://www.docker.com/community-edition).
2. Export your secrets and start typademic.

```bash
export GOOGLE_ANALYTICS=UA-YOURGOOGLECODE
export SECRET_KEY=SOMESECRETKEY
docker-compose up
```

To further strengthen your deployment process you should:
## Deployment (ADVANCED)

1. Add your custom SSL certificates (`key.pem` and `crt.pem`) to the root directory. Otherwise private certificates will be issued.

2. Create a `secrets.env` and add your env vars.

```bash
cp secrets.example.env secrets.env
nano secrets.env
```

3. Change `docker-compose.yml` accordingly.

- copy `key.pem` and `cert.pem` to the root to add a valid ssl certificate
- create a `secrets.env` for your env vars
```yaml
# uncomment this line for production use
# env_file: ./secrets.env

# comment this line for production use
environment:
- GOOGLE_ANALYTICS=${GOOGLE_ANALYTICS}
- SECRET_KEY=${SECRET_KEY}
```
4. Start typademic.
```bash
docker-compose up
```

## Built With

* [Bulma.io](https://bulma.io/)
* [CircleCI](https://circleci.com)
* [CircleCI](https://circleci.com/)
* [Docker CE](https://www.docker.com/community-edition)
* [Google Fonts](https://fonts.google.com/)
* [Flask](http://flask.pocoo.org/)
* [Flask-Dropzone](https://github.com/greyli/flask-dropzone)
* [Flask-WTF](https://flask-wtf.readthedocs.io/)
* [Google Fonts](https://fonts.google.com/)
* [LaTeX](https://www.latex-project.org/)
* [Pandoc](http://pandoc.org/)
* [Web-Font-Loader](https://github.com/qrpike/Web-Font-Load)

## Contributing

Expand Down

0 comments on commit 54b5512

Please sign in to comment.