Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump socket.io from 0.9.19 to 2.4.0 #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM debian:buster

RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl wget nano less ncat dnsutils procps \
build-essential \
openjdk-11-jre \
ruby ruby-dev \
python2.7

#gem update --system && \
RUN gem install compass

# Adds nodejs 10 repository
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
apt-get update && apt-get install -y --no-install-recommends \
nodejs

WORKDIR /app

COPY package*.json /app/

RUN npm install

COPY .docker/entrypoint.sh /

EXPOSE 8443
ENTRYPOINT ["/entrypoint.sh"]
7 changes: 7 additions & 0 deletions .docker/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash -e

mkdir -p /app/logs

npm run build

npm run start
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ codekit-config.json
high-score-*.json
/public/static/javascript/*.min.js
/public/static/css/*.css
php_errors.log
17 changes: 5 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,15 @@ A blog article about the techniques used: http://blog.fili.nl/project-multeor/

Please make sure you have the following installed on your system:

* Node + Npm
* Ruby
* Compass as a ruby gem
* Java JRE
* Local webserver (including php support if you want to use map-editor)
* git
* docker
* docker-compose

### Installing and building ###

1. Clone the repository
2. Install npm dependencies with `npm install`
2. Run `./multeor.sh build` to compile the sass and javascript
3. Point a webserver to the public directory as the document root

### Running Multeor ###

You can start the server-side of Multeor using `node server.js`. Alternatively use `./multeor.sh start-forever` command to run Multeor as a headless never-ending daemon, which can be stopped with `./multeor.sh stop`.
2. Run `docker-compose up`
3. Go to http://localhost

## License ##

Expand Down
29 changes: 29 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
version: '3.6'

services:
www:
image: php:7-apache
ports:
- "80:80"
volumes:
- ${PWD}/public/:/var/www/html/
restart: always

multeor:
build:
context: .
dockerfile: .docker/Dockerfile
ports:
- "443:1443"
volumes:
- type: bind
source: .
target: /app
- type: volume
source: node-modules
target: /app/node_modules
read_only: true
restart: always

volumes:
node-modules: {}
12 changes: 1 addition & 11 deletions multeor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,11 @@ ERRLOG=$CWD/logs/multeor.error
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
JSPATH="$DIR/public/static/javascript"

if [[ $EUID -eq 0 ]]; then
su -l multeor $0 $1
exit
fi

case "$1" in
start)
echo "Starting $TITLE..."
/usr/bin/env node $CWD/server.js
;;
start-forever)
echo "Forever starting $TITLE..."
mkdir -p $CWD/logs
$CWD/node_modules/forever/bin/forever start -o $LOG -e $ERRLOG $CWD/server.js
;;
stop)
echo "Stopping $TITLE..."
$CWD/node_modules/forever/bin/forever stop $CWD/server.js
Expand All @@ -40,7 +30,7 @@ case "$1" in
/usr/bin/env compass compile $DIR
;;
*)
echo "Usage: $0 {start|start-forever|stop|restart|build}"
echo "Usage: $0 {start|stop|restart|build}"
;;
esac

Loading