Commit bc399470 authored by priit's avatar priit

Lausestaja Dockeri alge

parent eaa2f698
......@@ -31,5 +31,9 @@ var config = require('./wrapper_configs/global');
});*/
config.serverUrl = process.env.SERVER_URL || 'http://dev.bitweb.ee';
config.wrapper = process.env.WRAPPER ? config.availableWrappers + process.env.WRAPPER : config.availableWrappers.CONCAT;
config.wrapper = process.env.WRAPPER ? (config.availableWrappers + process.env.WRAPPER) : config.availableWrappers.CONCAT;
config.fs.storagePath = "/files";
config.fs.tmpPath = "/tmp";
module.exports = config;
\ No newline at end of file
......@@ -8,4 +8,9 @@ if [ ! -f /src/config.js ]; then
ln -s /config/config.js /src/config.js
fi
if [ ! -f /config/wrapper_configs/global.js ]; then
mkdir -p /config/wrapper_configs
ln -s /src/wrapper_configs/global.js /config/global.js
fi
forever /src/app.js
\ No newline at end of file
......@@ -19,8 +19,8 @@ config.integration = [
];
config.fs = {
storagePath: "/files",
tmpPath: "/tmp"
storagePath: "/wrapper/files",
tmpPath: "/wrapper/tmp"
};
config.paramUsageTypes = {
......
FROM ubuntu:14.04
# docker build -t kl_lausestaja .
#
# docker run --name kl_redis --rm --restart=no redis
#
# docker run kl_lausestaja --name kl_lausestaja --link kl_redis:redis -v /wrapper/lausestaja/config:/config kl_lausestaja
#
# docker kill kl_lausestaja
#
# docker rm kl_lausestaja
#
#
MAINTAINER priit@bitweb.ee
FROM ubuntu:14.04
ENV TERM xterm
ENV WRAPPER=LAUSESTAJA
......@@ -11,17 +21,18 @@ RUN apt-get update && \
apt-get -y install curl && \
curl -sL https://deb.nodesource.com/setup | sudo bash - && \
apt-get -y install python build-essential nodejs && \
apt-get -y install git
RUN apt-get install unzip
apt-get -y install git && \
apt-get -y install unzip
RUN npm install -g forever
RUN mkdir -p /tmp && mkdir -p /files && mkdir -p /logs && mkdir -p /config
RUN mkdir -p /src
RUN mkdir -p /tmp
RUN mkdir -p /files
RUN mkdir -p /logs
RUN mkdir -p /config
RUN cd /src && git clone 'https://github.com/BitWeb/keeleliin-server.git' . && npm install && echo "Run is Done 2.2"
RUN cd /src && git clone 'https://github.com/BitWeb/keeleliin-wrapper-service.git' . && npm install && echo "Run is Done"
RUN mkdir /utils
COPY ./utils /utils
......@@ -30,8 +41,8 @@ RUN unzip /utils/morfyhestaja.zip -d /utils/
RUN chmod 777 -Rf /utils/*
#Expose port
EXPOSE 3000
EXPOSE $SERVER_PORT
VOLUME ["/tmp","/keeleliin_files","/keeleliin_logs", "/config"]
VOLUME ["/tmp","/files","/logs", "/config"]
CMD /./src/docker_start.sh
\ No newline at end of file
#!/bin/sh
BASEDIR=$(dirname $0)
RADA=$BASEDIR/morfyhestaja/konverter
RADAMRF=$BASEDIR/morfyhestaja/vabamorf/apps/cmdline/project/unix
RADADCT=$BASEDIR/morfyhestaja/vabamorf/dct
cat $1 | $RADA/rlausestaja.pl
......@@ -10,7 +10,11 @@ RUN apt-get update && \
RUN npm install -g forever
RUN mkdir -p /src && mkdir -p /tmp && mkdir -p /files && mkdir -p /logs && mkdir -p /config
RUN mkdir -p /src
RUN mkdir -p /tmp
RUN mkdir -p /files
RUN mkdir -p /logs
RUN mkdir -p /config
RUN cd /src && git clone 'https://github.com/BitWeb/keeleliin-wrapper-service.git' . && npm install && echo "RunisDon"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment