takenote
takenote copied to clipboard
[Bug] Fail to build and deploy to docker
I have followed the docker cmds given in the readme. Nothing shows on the the port number.
on my computer in the takenote
directory:
docker build --build-arg CLIENT_ID=[myid] -t [myusername]/takenote:latest .
on my linode server:
docker run -d -e CLIENT_ID=[myid] -e CLIENT_SECRET=[mysecret] -e NODE_ENV=production -p 80:5000 [myusername]/takenote:latest
(note: I have tried NODE_ENV=production and NODE_ENV=development like in the readme)
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1c74100721dd [myusername]/takenote:latest "docker-entrypoint.sā¦" 5 hours ago Up 5 hours 0.0.0.0:80->5000/tcp flamboyant_easley
When going to the ip there is nothing there. This is a Debian 9 vm.
I have also tried running locally on docker desktop for mac with similar results.
I have also tried changing to "client": "cross-env NODE_ENV=production webpack serve --config config/webpack.dev.js"
in the package.json
with similar results.
I also have similar problem. I checked the /app/dist directory in the container and there is nothing in the directory.
Just a note, I was successfully able to build on a Mac. I did find an error in the Dockerfile
that wasn't addresses when the demo went from being hosted on Docker to being a static site. (Instead of npm start
it needs to be npm run prod
as the last command. I'll push up a PR to address that issue. Otherwise, I haven't had a problem building and running the Docker on Mac. I haven't tested on Linux lately but it was working previously on a DigitalOcean droplet.