dockerino
This commit is contained in:
parent
963d4d1750
commit
3bcb921032
34
Dockerfile
Normal file
34
Dockerfile
Normal file
@ -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"]
|
||||
15
api/package.json
Normal file
15
api/package.json
Normal file
@ -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"
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user