1.4.2 • Published 2 years ago

developer-adk-train v1.4.2

Weekly downloads
569
License
MIT
Repository
github
Last release
2 years ago

PilotCity-Boiler

This a template repository that can be used for PilotCity developers to create their own activities for the PilotCity Platform. <<<<<<< HEAD Fork this repo to start developing Do to the extensive use of docker, it's recommended for you to be familiar with docker and docker-compose before using this repository.

Project setup

This project is built for development through docker and vscode. Everything should work out of the box.

Once forked you can start the development server by:

Do to the extensive use of docker, it's recommended for you to be familiar with docker and docker-compose before using this repository.

Using the template

To use this repo, create a template on your own github account. Do this by clicking on the template button on the top right of the repository page. Make it public and only pull the master branch.

Project setup

This project is built for development through docker and vscode. Everything should work out of the box.

Add Original Template as upstream for changes

git remote add upstream https://github.com/PilotCityInc/PilotCity-PDK-Boiler git merge upstream/master master --allow-unrelated-histories --squash Fix any conflicts if possible git push

upstream/master

docker-compose up

This will start multiple services as outlined in the docker-compose.yml file. By default this will start 4 services.

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
    ...
## Container Development workflow
Start all the services using `docker-compose up` . A service can be specified by using `docker-compose up $SERVICE`.

### microapp 
It's recommended to attach a terminal directly to the running microapp instance for development and building directly inside the container.
See (here)[https://code.visualstudio.com/docs/remote/containers]
Git management would be handled outside the container while all project files are handled directly in the container.

#### 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`. 
If a new dependency is added to the project it is recommended to rebuild the image rather than installing packages manually. 
`docker-compose down` followed by `docker-compose up --build`

### mongodb
The Mongo service requires no configuration. 

### mongo-cli
To use the mongo cli make sure all services are running then attach a shell to the cli.
After running `docker-compose up`  then a terminal can be attached to the cli by `docker attach mongo-cli` 

### mongo-express
The express server requires no configuration and should run following a successful start of the mongodb service

## Troubleshooting
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

### Lints and fixes files

docker-compose run microapp yarn lint

## Docker Resources
https://www.thebyte.io/offers/wqnqeqQm/checkout

### signed by akheel
1.2.0

2 years ago

1.2.6

2 years ago

1.2.5

2 years ago

1.4.2

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.4.0

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.3.1

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.60

3 years ago

1.0.59

3 years ago

1.0.58

3 years ago

1.0.51

3 years ago

1.0.48

3 years ago

1.0.49

3 years ago

1.0.50

3 years ago

1.0.44

3 years ago

1.0.47

3 years ago

1.0.46

3 years ago

1.0.45

3 years ago

1.0.43

3 years ago

1.0.42

3 years ago

1.0.41

3 years ago

1.0.40

3 years ago

1.0.39

3 years ago

1.0.38

3 years ago

1.0.33

3 years ago

1.0.32

3 years ago

1.0.36

3 years ago

1.0.35

3 years ago

1.0.34

3 years ago

1.0.29

3 years ago

1.0.28

3 years ago

1.0.31

3 years ago

1.0.30

3 years ago

1.0.26

3 years ago

1.0.25

3 years ago

1.0.24

3 years ago

1.0.23

3 years ago

1.0.27

3 years ago

1.0.22

3 years ago

1.0.21

3 years ago

1.0.20

3 years ago

1.0.19

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.10

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.0

3 years ago

1.0.1

3 years ago