https://github.com/daern91/ts-monorepo-docker-demo
https://github.com/daern91/ts-monorepo-docker-demo
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/daern91/ts-monorepo-docker-demo
- Owner: daern91
- Created: 2018-12-06T11:53:13.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-10T10:26:48.000Z (over 7 years ago)
- Last Synced: 2025-01-07T14:24:30.661Z (over 1 year ago)
- Language: TypeScript
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
### Readme
All below commands are to be executed from `root` folder.
#### Local install
1. Run `yarn` to install all dependencies, this installs them correctly both in root and links local dependencies together. The `postinstall` hook will also run `yarn tsc` to type-check and build files.
2. Run `yarn test` which runs both scripts `yarn w:a` and `yarn w:c` to run programs in `workspace-a` for `workspace-c`
#### Individual docker builds
1. Build `workspace-a` image with
```
docker build -t workspace-a --build-arg package_json="$(cat $(pwd)/package.json)" -f packages/Dockerfile-workspace-a ./packages/
```
2. Build `workspace-c` image with
```
docker build -t workspace-c -f packages/Dockerfile-workspace-c ./packages/
```
3. Run with `docker run workspace-`
#### Docker-compose
1. Build images with
```
docker-compose build --build-arg package_json="$(cat $(pwd)/package.json)"
```
2. Run `docker-compose up` or `docker-compose run workspace-`