Skip to content

Instantly share code, notes, and snippets.

@jocafi
Last active December 6, 2018 09:34
Show Gist options
  • Save jocafi/c54d10ff1d4b8d695a898ee8231de24e to your computer and use it in GitHub Desktop.
Save jocafi/c54d10ff1d4b8d695a898ee8231de24e to your computer and use it in GitHub Desktop.
Deployment using Docker for static web apps or SPA (Tests purposes only)
{
"port": 3000,
"files": false,
"watch": false,
"open": false,
"notify": false,
"ghostMode": false,
"logLevel": "silent",
"server": {
"middleware": {
"0": null
}
}
}
# To CREATE, run:
# $ docker build -f Dockerfile -t jocafi/myapp:1.0.0 .
# To START, run:
# $ docker run -p 3000:3000 --name myapp -d jocafi/myapp:1.0.0
FROM node:10.13.0-alpine
WORKDIR $HOME/dist
# dist contains the Angular App or any SPA
COPY dist/ .
# browser-sync configuration
# more information can be found at https://www.browsersync.io/docs/options/
COPY bs-config.json .
EXPOSE 3000/tcp
EXPOSE 3001/tcp
RUN npm i -g lite-server
CMD lite-server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment