Dockerized ngx-admin : long compile on save
- Lenguaje dominante
- TypeScript
- Estrellas
- 25.7k
- Forks
- 7.9k
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Hi,
I dockerized your application on an ubuntu VM. With my PC (Windows) I can view the interface on 'http://192.168.xxx.xxx:2007'. The "problem" (if it's one) is that I think the "compile on save" is really long, so I'm wondering if I correctly setup the container.
It takes about 40 to 45s to reload the interface after a file has been modified.
I tried to do it locally (on Windows, without docker and run it with "ng serve") and it only takes 10 or 11 seconds. Is it normal that it takes so long in a container ? Or have I missed something in the container configuration ? How can I not wait 40 seconds every time I change something to see the modifications?
Thanks in advance!
### Container configuration
My Dockerfile (location = /www/pathToDockerFiles/ngx-admin)
```bash
FROM node:12
RUN mkdir /www
WORKDIR /www
EXPOSE 4200
CMD npm run start
# in package.json = "ng serve --host 0.0.0.0"
```
My docker-compose.yml file (location = /www/docker-compose.yml)
```yaml
my-front:
image: my-ngx-admin
ports:
- 2007:4200
volumes:
- ./pathToAppsFolders/my_front:/www/
```
Commands :
1. Get sources and install : `git clone https://github.com/akveo/ngx-admin.git /www/pathToAppsFolders/my_front && cd /www/pathToAppsFolders/my_front && npm install`
3. Build the image : `cd /www/pathToDockerFiles/ && docker build -t my-ngx-admin -f ngx-admin .`
4. Up containers and display : `docker-compose up -d && clear && docker ps -a`
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.