diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..869365a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,34 @@ +FROM node:latest AS Build + +RUN npm install haxe --global +RUN npm install lix --global --force + + +COPY ./api /app + +WORKDIR /app + +RUN lix scope +RUN lix download +RUN lix use haxe stable +# RUN lix install haxelib:hxnodejs + + +RUN haxe build.hxml + +FROM node:latest + +COPY --from=Build /app/build /app +COPY --from=Build /app/package.json /app/package.json +COPY --from=Build /app/res /app/res + + +WORKDIR /app/ + +RUN npm install + +EXPOSE 8080 + +# CMD ["node", "out.js"] +CMD ["node", "out.js"] +# CMD ["/bin/bash"] \ No newline at end of file diff --git a/api/package.json b/api/package.json new file mode 100644 index 0000000..845e1bf --- /dev/null +++ b/api/package.json @@ -0,0 +1,15 @@ +{ + "name": "drivebyapi", + "version": "1.0.0", + "description": "api", + "main": "out.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "dependencies": { + "mysql": "^2.18.1", + "sqlite3": "^5.0.11" + } +}