adding docker support

This commit is contained in:
Joe Auman 2021-11-07 21:13:12 -05:00
parent badc2fdb74
commit f429ab8361
3 changed files with 31 additions and 0 deletions

8
Dockerfile Normal file
View File

@ -0,0 +1,8 @@
FROM node:16-alpine
EXPOSE 8080
COPY docker-init.sh /
ENTRYPOINT [ "sh", "/docker-init.sh" ]

11
docker-compose.yml Normal file
View File

@ -0,0 +1,11 @@
version: "2"
services:
apple2js:
container_name: "apple2js"
build: .
restart: always
volumes:
- ./:/home/node/app
ports:
- '8080:8080'

12
docker-init.sh Normal file
View File

@ -0,0 +1,12 @@
#!/bin/sh
echo "Preparing..."
cd /home/node/app
chown -R node:node .
echo "Building..."
npm install
echo "Starting server..."
npm start