https://github.com/bikecoders/docker-compose_angular
A docker compose for Angular projects Development
https://github.com/bikecoders/docker-compose_angular
angular angular-cli docker-compose docker-image dockerfiles
Last synced: about 1 month ago
JSON representation
A docker compose for Angular projects Development
- Host: GitHub
- URL: https://github.com/bikecoders/docker-compose_angular
- Owner: bikecoders
- License: mit
- Created: 2018-01-20T23:38:03.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-05T22:56:26.000Z (over 8 years ago)
- Last Synced: 2025-03-29T10:24:37.278Z (about 1 year ago)
- Topics: angular, angular-cli, docker-compose, docker-image, dockerfiles
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Useful commands
### First of all
`docker-compose pull && docker-compose build`
--------
### Create a New Project
`docker-compose run --rm --user=$UID angular ng new YOUR-PROJECT-NAME --style scss --directory ./`
**IMPORTANT**
You need to add in the `package.json` file the following at the end of the script `start` -> `--host 0.0.0.0`
--------
### Install Packages
#### Install dependencies
`docker-compose run --rm --user=$UID angular yarn install`
#### Normal
`docker-compose run --rm --user=$UID angular yarn add PACKAGE_NAME`
#### Dev dependency
`docker-compose run --rm --user=$UID angular yarn add --dev PACKAGE_NAME`
---------------
### Remove a Package
`docker-compose run --rm --user=$UID angular yarn remove PACKAGE_NAME`
---------------
### Serve your application to development
`docker-compose up` and access in `localhost:4200`
---------------
### Generate an Angular Component
`docker-compose run --rm --user=$UID angular ng generate component COMPONENT_NAME`
> It's very important to use the parameter `--user=$UID` to generate the compoent with your user and not as `root` and be able to modify it
---------------
### Build the project
`docker-compose run --rm --user=$UID angular ng build --prod`
---------------