add (untested) docker stuff

This commit is contained in:
Enstrayed
2023-11-06 11:54:01 -08:00
parent 74d9b82e0e
commit 97f6e97eee
3 changed files with 21 additions and 0 deletions

6
Dockerfile Normal file
View File

@@ -0,0 +1,6 @@
FROM node:20
WORKDIR /app
EXPOSE 8127
CMD [ "bash", "init.sh" ]
# This is just copied from urlshortener cause both apps have similar architecture

11
docker-compose.yml Normal file
View File

@@ -0,0 +1,11 @@
version: '3.0'
services:
enstrayedapi:
build:
context: .
image: enstrayedapi
container_name: enstrayedapi
restart: unless-stopped
volumes:
- .:/app

4
init.sh Normal file
View File

@@ -0,0 +1,4 @@
#! /bin/bash
npm install
node index.js