danielfm
/
texbin
Archived
1
0
Fork 0
Service for posting and serving TeX documents as PDF.
This repository has been archived on 2022-07-15. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 
 
Go to file
Daniel Fernandes Martins 2da26b489b Fig is now deprecated; using docker-compose instead. 2015-03-15 22:34:02 -03:00
app Fixed imports. 2014-08-12 10:39:25 -03:00
bin First commit. 2014-08-11 13:03:21 -03:00
config Uncommented root clause. 2014-09-03 01:45:07 -03:00
db First commit. 2014-08-11 13:03:21 -03:00
lib First commit. 2014-08-11 13:03:21 -03:00
log First commit. 2014-08-11 13:03:21 -03:00
public First commit. 2014-08-11 13:03:21 -03:00
tmp First commit. 2014-08-11 13:03:21 -03:00
vendor/assets/javascripts First commit. 2014-08-11 13:03:21 -03:00
.dockerignore Replaced Vagrant by Fig. 2014-08-13 22:29:41 -03:00
.env Exposes the volume in the base image. 2014-08-14 10:30:35 -03:00
.gitignore First commit. 2014-08-11 13:03:21 -03:00
.ruby-gemset First commit. 2014-08-11 13:03:21 -03:00
.ruby-version First commit. 2014-08-11 13:03:21 -03:00
Dockerfile Fixed weird problem with VOLUME that was causing with asset:precompile. 2014-08-14 10:40:30 -03:00
Gemfile Removed old comment. 2014-09-03 01:48:23 -03:00
Gemfile.lock Removed unused dependency. 2014-08-12 10:34:26 -03:00
Procfile First commit. 2014-08-11 13:03:21 -03:00
README.md Fig is now deprecated; using docker-compose instead. 2015-03-15 22:34:02 -03:00
Rakefile First commit. 2014-08-11 13:03:21 -03:00
TODO Updated TODO. 2014-08-11 13:05:01 -03:00
config.ru First commit. 2014-08-11 13:03:21 -03:00
docker-compose.yml Fig is now deprecated; using docker-compose instead. 2015-03-15 22:34:02 -03:00

README.md

TeXBin

TeXBin is a service for posting and serving TeX documents as PDFs. It's also a simple application that I've put together in order to study Docker.

Disclaimer: This app is just a proof of concept, so it's not really made for production use!

Features

  • Easily deployed as a Docker container
  • Automatic partition of uploaded files for fast disk lookups
  • Configurable via the .env file

Dependencies

Running Texbin

Docker + docker-compose

Just run docker-composee up in order to build the required images and start the containers in the proper order. This command will take several minutes to complete. Go grab a coffee.

After it's done, run docker-compose ps to make sure all containers are up and running. Then, visit http://localhost to open the application.

At this point, feel free to change some code and refresh the browser to see the changes right away, without the need to reload the container yourself.

Docker (in the cloud)

Here's how to do it manualy so you can automate the process however you want.

First, clone this project in your server and run docker build -t texbin . in order to build the base image.

After that, go to config/docker/texbin_deploy and change whatever config you want. Then, run docker build -t texbin_<env> . to build the image tailored for the environment env (.i.e. production).

Do the same procedure in config/docker/nginx and build the image with docker build -t texbin_nginx ..

Finally, it's time to start the containers:


$ sudo docker run --name texbin_mongodb -d mongo
$ sudo docker run --name texbin_<env>_1 -d --link texbin_mongodb:mongodb texbin_prod
$ sudo docker run --name texbin_nginx_1 -d --link texbin_<env>_1:app --volumes-from texbin_<env>_1 -p 80:80 texbin_nginx

Run docker ps to make sure all containers are up and running. Then, visit http://your-server-ip to open the application.