1
0
Fork 0
mirror of https://github.com/docker/awesome-compose.git synced 2025-04-26 10:43:35 +02:00
awesome-compose/angular
dependabot[bot] 68fc4297ab
Bump webpack and @angular-devkit/build-angular in /angular/angular
Bumps [webpack](https://github.com/webpack/webpack) to 5.98.0 and updates ancestor dependency [@angular-devkit/build-angular](https://github.com/angular/angular-cli). These dependencies need to be updated together.


Updates `webpack` from 5.67.0 to 5.98.0
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.67.0...v5.98.0)

Updates `@angular-devkit/build-angular` from 13.2.6 to 19.2.4
- [Release notes](https://github.com/angular/angular-cli/releases)
- [Changelog](https://github.com/angular/angular-cli/blob/main/CHANGELOG.md)
- [Commits](https://github.com/angular/angular-cli/compare/13.2.6...19.2.4)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: indirect
- dependency-name: "@angular-devkit/build-angular"
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-20 02:03:55 +00:00
..
angular Bump webpack and @angular-devkit/build-angular in /angular/angular 2025-03-20 02:03:55 +00:00
.gitignore Move all samples to the root dir 2020-03-16 17:23:59 +01:00
compose.yaml angular: add dev envs configuration 2022-07-01 13:50:58 -04:00
output.png full update of the Angular sample (#176) 2021-11-04 17:22:24 +01:00
README.md remove references to Dev Environments feature 2024-05-18 11:08:07 +02:00

Compose sample

Angular service

Project structure:

.
├── angular
│   ├── Dockerfile
│   ├── ...
│   ├── ...
│   ....
└── compose.yaml

compose.yaml

services:
  web:
    build: angular
    ports:
    - 4200:4200
    ...

The compose file defines an application with one service angular. The image for the service is built with the Dockerfile inside the angular directory (build parameter).

When deploying the application, docker compose maps the container port 4200 to the same port on the host as specified in the file. Make sure port 4200 is not being used by another container, otherwise the port should be changed.

Deploy with docker compose

$ docker compose up -d
Creating network "angular_default" with the default driver
Building angular
Step 1/7 : FROM node:10
10: Pulling from library/node
c0c53f743a40: Pull complete
...
...
Successfully built efea5cef6851
Successfully tagged angular_web:latest
WARNING: Image for service web was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`.
Creating angular_web_1 ... done

Expected result

Listing containers must show a container running and the port mapping as below:

$ docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                  NAMES
6884c228388e        angular_web         "docker-entrypoint.s…"   42 seconds ago      Up 36 seconds       0.0.0.0:4200->4200/tcp angular_web_1

After the application starts, navigate to http://localhost:4200 in your web browser.

page

Stop and remove the container

$ docker compose down