PilotCity Development Kit Template for creating your own Program Activities
npm install developer-adk-rfpgit remote add upstream https://github.com/PilotCityInc/PilotCity-PDK-Boiler git merge upstream/master master --allow-unrelated-histories --squashgit push```
docker-compose up`
This will start multiple services as outlined in the docker-compose.yml file.
By default this will start 4 services.yml
version: '3.8'
networks:
pdk:
driver: bridge
services:
microapp: # Microapp builds the pdk-sample. By default the in-container development image is used. See more here https://code.visualstudio.com/docs/remote/containers
container_name: microapp
...
# microapp: # host-based development. This image syncs the state of the container with the host. Simpler to use, although its much more intensive
# container_name: microapp
...
mongodb: # creates local mongodb database server with prebuilt test data
image: mongo
container_name: mongodb
...
mongo-cli: # creates a mongo shell that attatches to the local database defined above
container_name: mongo-cli
image: mongo
mongo-express: # mongodb web client for Database GUI
image: mongo-express
container_name: mongo-express
...
`docker-compose upContainer Development workflow
Start all the services using . A service can be specified by using docker-compose up $SERVICE.
#### dependency management
dependencies can be managed directly inside the container. To install a new dependency attach your terminal directly to the container
docker attach microapp then yarn add $PACKAGE. docker-compose down
If a new dependency is added to the project it is recommended to rebuild the image rather than installing packages manually. followed by docker-compose up --build
then a terminal can be attached to the cli by docker attach mongo-cli $3
The express server requires no configuration and should run following a successful start of the mongodb serviceTroubleshooting
If problems with docker-compose up are encountered its most likely a problem with the fixed container names. If a service is killed then the container is not removed on shutdown.
docker-compose down will clean all containers related to this project.
A subsequent docker-compose up should work.
Other Features
`
docker-compose run microapp yarn test:unit
`$3
`
docker-compose run microapp yarn lint
``