Skip to content

Commit

Permalink
It's Faaast
Browse files Browse the repository at this point in the history
  • Loading branch information
theodorosploumis committed Nov 2, 2017
0 parents commit 9aa9141
Show file tree
Hide file tree
Showing 14 changed files with 714 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Ignore
.idea
/html/vendor
/html/builds
/html/settings.php
72 changes: 72 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
FROM ubuntu:16.04

RUN apt-get update

# Install build tools and libraries
RUN apt-get install -yqq \
apache2 \
build-essential \
software-properties-common \
zip \
curl \
wget \
git \
python \
python-dev \
python-pip \
python-software-properties \
ruby-all-dev \
sqlite3 \
zlib1g-dev

# Install PHP
RUN apt-get install -yqq php7.0 \
php7.0-cli \
php7.0-curl \
php7.0-common \
php7.0-mbstring \
php7.0-gd \
php7.0-intl \
php7.0-xml \
php7.0-json \
php7.0-mysql \
php7.0-mcrypt \
php7.0-zip

# Prepare to install nodejs
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -

RUN apt-get update && \
apt-get install nodejs

# Upgrade pip
RUN pip install --upgrade pip

# Install Bundler
RUN gem install bundler --no-ri --no-rdoc && \
echo "gem: --no-document" >> ~/.gemrc

# Install yarn, pnpm, ied
RUN /bin/bash -c "npm --quiet --no-progress install -g yarn pnpm ied"

# Install composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \
composer global require hirak/prestissimo

# Install Drush
RUN wget -q https://github.com/drush-ops/drush/releases/download/8.1.15/drush.phar && \
chmod +x drush.phar && \
mv drush.phar /usr/local/bin/drush

# Clean packages
RUN apt-get clean && \
apt-get autoremove && \
rm -rf /var/lib/apt/lists && \
rm -f /var/www/html/index.html

# Create downloads folder
RUN mkdir /downloads

WORKDIR /home

VOLUME ["/.gems", "/.npm", "/.composer", "/usr/local/share/.cache/yarn/v1", "/.drush/cache/download"]
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2017 Theodoros Ploumis

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
59 changes: 59 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Faaast

[![Docker Stars](https://img.shields.io/docker/stars/tplcom/faaast.svg)]() [![Docker Build
Status](https://img.shields.io/docker/build/tplcom/faaast.svg)](https://hub.docker.com/r/tplcom/faaast/builds/)

## About

A package manager as a service (SaaS).

Or a package software with **npm, pnpm, yarn, ied, gem, composer, bundler, drush, pip etc** using
Docker.

## Why

- Because sometimes there unknown errors with package managers.
- Because WiFi issues may corrupt packaging.
- Because sometimes you don't want to spend time for packaging.
- Because not every machine can use packages.
- Because Docker can do this!

## Usage

- Try online at [faaast.download](https://faaast.download/?utm_source=github&utm_medium=browser&utm_campaign=github_repo).

- If you want to use the docker image ([tplcom/faaast](https://hub.docker.com/r/tplcom/faaast)) on
your own:

```bash
// Let's assume you want to run "npm install visionmedia/express"
// This will get the "node_packages" under current path "home" folder
docker run -it --rm -w /home -v $(pwd)/home:/home tplcom/faaast npm install visionmedia/express
```
## Software per docker image
| Software | Version |
| :--- |:--- |
| bundler | 1.16.0 |
| composer | 1.5.2 |
| drush | 8.1.15 |
| gem | 2.5.1 |
| ied | 2.3.6 |
| node | v8.9.0 |
| npm | 5.5.1 |
| pnpm | 1.19.3 |
| python | 2.7.12 |
| pip | 9.0.1 |
| php | 7.0.22 |
| ruby | 2.3.1p112 |
| yarn | 1.2.1 |
## ToDo
See this issue: [ToDo](https://github.com/theodorosploumis/faaast/issues/1).
## License
[![license](https://img.shields.io/github/license/theodorosploumis/faaast.svg)](LICENSE)
20 changes: 20 additions & 0 deletions html/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Web UI

On a fresh **Ubuntu/Debian x64** machine login as 'root' and run this:

```bash
curl -sS -o /tmp/server-install.sh https://raw.githubusercontent.com/theodorosploumis/faaast/master/scripts/server-install.sh | DOMAIN="mydomain.com" && sh /tmp/server-install.sh

```

This will install the Web UI on a server with main domain.

- Tested with Debian 9.2 x64
- Needs at least 2GB of RAM
- Docker images need at least 2GB space

Local development.

```
php -S localhost:8899 -t html/
```
72 changes: 72 additions & 0 deletions html/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
body {
background: #eaeaea;
font-family: "Cutive Mono" ,"Courier New", Courier, monospace;
}

.wrapper {
overflow: hidden;
padding: 20px 80px;
margin: 0 auto;
max-width: 1260px;
min-height: 400px;
}

h1 {
font-size: 26px;
text-align: center;
margin: 40px 20px 0;
position: relative;
}

.info {
margin: 30px auto;
border: 1px solid #c1c0c0;
padding: 5px;
width: 350px;
}

footer {
clear: both;
overflow: hidden;
padding-top: 10px;
border-top: 1px solid #fff;
text-align: center;
}

label {
display: block;
margin: 15px 0 0;
font-weight: bold;
}

input {
padding: 10px;
min-width: 350px;
}

input[name="id"] {
opacity: 0.4;
}

.form {
width: 350px;
margin: 0 auto;
}

.submit {
background: #ff4500;
color: #fff;
margin: 20px 0;
border: none;
padding: 14px;
font-size: 20px;
text-transform: uppercase;
font-weight: bold;
cursor: pointer;
}

#running {
margin-top: 20px;
display: none;
text-align: center;
}
Loading

0 comments on commit 9aa9141

Please sign in to comment.