Skip to content

Commit

Permalink
Add dockerfile, docks and init script
Browse files Browse the repository at this point in the history
  • Loading branch information
lodoyun committed Jul 14, 2017
1 parent baeed35 commit 360e9ff
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 6 deletions.
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM ubuntu:14.04

MAINTAINER Lynckia

WORKDIR /opt

# Download latest version of the code and install dependencies
RUN apt-get update && apt-get install -y curl
RUN curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - && sudo apt-get install -y nodejs

COPY . /opt/ackuaria

# Clone and install licode
WORKDIR /opt/ackuaria

RUN npm install

WORKDIR /opt

ENTRYPOINT ["./ackuaria/extras/docker/initDockerAckuaria.sh"]
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,21 @@
+ npm
+ Mongodb (Optional. You can disable this option in ackuaria_config.js)

<!---
More info at:
http://www.lynckia.com/ackuaria ????
-->

## Installation

See [INSTALL.md](INSTALL.md)
To install locally see [INSTALL.md](INSTALL.md)

#### Docker
You can also use [Docker](https://www.docker.com/).
You can build your own image using the Dockerfile we provide and then run the container from it or you can run the container directly from the image we provide in Docker Hub.

To get the image form docker hub run `docker pull lynckia/ackuaria`. You can configure the container by mounting a volume in `/opt/assets` including both the configuration file (`ackuaria_config.js`) and the nuve client for your current licode version. The entry point script will automatically copy both files and run ackuaria.

`[sudo] docker run -p 8888:8888 -v [PATH_TO_YOUR_ASSETS_DIR]:/opt/assets`

Make sure ackuaria can communicate with the Rabbitmq server from your Licode installation


## License

Expand All @@ -26,4 +33,4 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of

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.
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.
20 changes: 20 additions & 0 deletions extras/docker/initDockerAckuaria.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
SCRIPT=`pwd`/$0
ROOT=/opt/ackuaria
ASSETS=/opt/assets

copy_assets(){
if [ -d "$ASSETS" ]; then
echo "copying ackuaria assets"
cp $ASSETS/*.js $ROOT
fi
}

run_ackuaria() {
echo "running ackuaria"
npm start
}

cd $ROOT
copy_assets
run_ackuaria

0 comments on commit 360e9ff

Please sign in to comment.