Merge pull request #16 from acelaya/feature/0.1.1

Feature/0.1.1
This commit is contained in:
Alejandro Celaya 2018-08-06 20:35:38 +02:00 committed by GitHub
commit c8e5dfad5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 78 additions and 23 deletions

4
.dockerignore Normal file
View file

@ -0,0 +1,4 @@
./build
./dist
./node_modules
./test

23
CHANGELOG.md Normal file
View file

@ -0,0 +1,23 @@
# CHANGELOG
## 0.1.1 - 2018-08-06
#### Added
* [#15](https://github.com/shlinkio/shlink-web-client/issues/15) Added a `Dockerfile` that can be used to generate a distributable docker image
#### Changed
* *Nothing*
#### Deprecated
* *Nothing*
#### Removed
* *Nothing*
#### Fixed
* *Nothing*

View file

@ -1,12 +1,21 @@
FROM node:10.4.1-alpine FROM nginx:1.15.2-alpine
MAINTAINER Alejandro Celaya <alejandro@alejandrocelaya.com> MAINTAINER Alejandro Celaya <alejandro@alejandrocelaya.com>
# Install yarn # Install node and yarn
RUN apk add --no-cache --virtual yarn RUN apk add --no-cache --virtual nodejs && apk add --no-cache --virtual yarn
# Make home dir writable by anyone ADD . ./shlink-web-client
RUN chmod 777 /home
CMD cd /home/shlink/www && \ # Install dependencies and build project
RUN cd ./shlink-web-client && \
yarn install && \ yarn install && \
yarn start yarn build && \
# Move build contents to document root
cd .. && \
rm -r /usr/share/nginx/html/* && \
mv ./shlink-web-client/build/* /usr/share/nginx/html && \
rm -r ./shlink-web-client && \
# Delete and uninstall build tools
yarn cache clean && apk del yarn && apk del nodejs

View file

@ -2,4 +2,24 @@
[![Build Status](https://travis-ci.org/shlinkio/shlink-web-client.svg?branch=master)](https://travis-ci.org/shlinkio/shlink-web-client) [![Build Status](https://travis-ci.org/shlinkio/shlink-web-client.svg?branch=master)](https://travis-ci.org/shlinkio/shlink-web-client)
A React-based client application for [Shlink](https://shlink.io) A ReactJS-based progressive web application for [Shlink](https://shlink.io).
## Installation
There are three ways in which you can use this application.
* The easiest way to use shlink-web-client is by just going to https://app.shlink.io.
The application runs 100% in the browser, so you can use that instance and access any shlink instance from it.
* Self hosting the application yourself.
Get the [latest release](https://github.com/shlinkio/shlink-web-client/releases/latest) and download the distributable zip file attached to it (`shlink-web-client_X.X.X_dist.zip`).
The package contains static files only, so just put it in a folder and serve it with the web server of your choice (just take into account that all the files are served using absolute paths, so you have to serve it from the root of your domain, not from a subpath).
* Use the official [docker image](https://hub.docker.com/r/shlinkio/shlink-web-client/)
If you want to deploy shlink-web-client in a container-based cluster (docker swarm, kubernetes, etc), just pick the image and do it.
It's a lightweight [nginx:alpine image](https://hub.docker.com/r/library/nginx/) serving the assets on port 80.

View file

@ -3,9 +3,8 @@ version: '3'
services: services:
shlink_web_client_node: shlink_web_client_node:
container_name: shlink_web_client_node container_name: shlink_web_client_node
build: image: node:10.4.1-alpine
context: . command: /bin/sh -c "cd /home/shlink/www && yarn install && yarn start"
dockerfile: ./Dockerfile
volumes: volumes:
- ./:/home/shlink/www - ./:/home/shlink/www
ports: ports: