i want to deploy my Angular2/ts app within a docker container. I found the following tutorial which works really good: Link. So my docker-compose.yml now is:
version: '2'
services:
httpd:
image: httpd:latest
volumes:
- ./:/usr/local/apache2/htdocs/
- ./node_modules:/usr/local/apache2/htdocs/node_modules
ports:
- "80:80"
npm:
image: treyjones/npm:latest
volumes:
- ./:/npm
tsc:
image: treyjones/tsc:latest
volumes:
- ./:/tsc
but I have the problem that the routing does not work right.
I can reach my app via
and it redirects me to
So to this point everything works great. But i I refresh my page, or try to reach it via
I get an error:
"GET /data HTTP/1.1" 404 205
I've already had this problem before I used a docker container, and solved it using live-server, as mentioned in Link. Which means that I added the script:
"serve": "concurrently \"live-server --port=5556 --entry-file=index.html \" \"gulp\" \"npm run tsc:w\" "
within my package.json.
But I do not know how I can integrate live-server into my docker-configuration or how I can manipulate httpd such that I can an option like the option
--entry-file=index.html
of the live-server.