-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (25 loc) · 899 Bytes
/
Dockerfile
File metadata and controls
34 lines (25 loc) · 899 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FROM node:10.22-alpine
MAINTAINER Guillermo "guille@binary-coffee.dev"
RUN echo 'http://dl-cdn.alpinelinux.org/alpine/v3.6/main' >> /etc/apk/repositories
RUN echo 'http://dl-cdn.alpinelinux.org/alpine/v3.6/community' >> /etc/apk/repositories
RUN apk update
RUN apk add git
RUN apk add mongodb=3.4.4-r0
ENV NODE_ENV=docker
RUN git clone https://github.com/wil92/dev-game-client.git
RUN git clone https://github.com/wil92/dev-game.git
RUN cd /dev-game-client;npm install
COPY client-config.js /dev-game-client/src/config.js
RUN cd /dev-game-client;npm run build
# nginx configuration
RUN apk add nginx
COPY nginx.conf /etc/nginx/conf.d/default.conf
RUN nginx -g 'pid /tmp/nginx.pid;'
# configure mongodb
RUN mkdir -p /data/db
# install game server
WORKDIR dev-game
RUN cd /dev-game;npm install
# Start services
COPY start-services.sh /start-services.sh
CMD ["/bin/sh", "/start-services.sh"]