nautobot / go-nautobot

Autogenerated Nautobot API Go Bindings
Other
7 stars 3 forks source link

Add development setup to README #8

Closed Kircheneer closed 2 years ago

Kircheneer commented 2 years ago

Currently it is unclear how to get an environment set up to develop in. Taking the approach from the GitHub actions file doesn't work to bring up the environment, the oapi container fails to start.


❯ docker-compose --project-name go_nautobot -f development/docker-compose.yml up --build --abort-on-container-exit
Creating network "go_nautobot_default" with the default driver
Creating volume "go_nautobot_postgres_data" with default driver
Building oapi
[+] Building 0.9s (11/11) FINISHED                                                                                                                                                                                      
 => [internal] load build definition from Dockerfile                                                                                                                                                               0.0s
 => => transferring dockerfile: 303B                                                                                                                                                                               0.0s
 => [internal] load .dockerignore                                                                                                                                                                                  0.0s
 => => transferring context: 2B                                                                                                                                                                                    0.0s
 => [internal] load metadata for docker.io/library/golang:1.18-alpine                                                                                                                                              0.8s
 => [1/6] FROM docker.io/library/golang:1.18-alpine@sha256:8e45e2ef37d2b6d98900392029db2bc88f42c0f2a9a8035fa7da90014698e86b                                                                                        0.0s
 => [internal] load build context                                                                                                                                                                                  0.0s
 => => transferring context: 931B                                                                                                                                                                                  0.0s
 => CACHED [2/6] WORKDIR /app                                                                                                                                                                                      0.0s
 => CACHED [3/6] RUN apk update     && apk add gcc musl-dev gcompat                                                                                                                                                0.0s
 => CACHED [4/6] RUN go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@v1.11.0                                                                                                                           0.0s
 => CACHED [5/6] COPY development/generate.sh ./                                                                                                                                                                   0.0s
 => CACHED [6/6] COPY development/oapi-config.yml ./                                                                                                                                                               0.0s
 => exporting to image                                                                                                                                                                                             0.0s
 => => exporting layers                                                                                                                                                                                            0.0s
 => => writing image sha256:ff18519cc3c23cef2a4896837db45f5c7b147a00d47d57a7a3ca69a882b0862c                                                                                                                       0.0s
 => => naming to docker.io/networktocode/oapi:local                                                                                                                                                                0.0s

Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
Creating go_nautobot_db_1    ... done
Creating go_nautobot_redis_1 ... done
Creating go_nautobot_nautobot_1 ... done
Creating go_nautobot_celery_worker_1 ... done

ERROR: for oapi  Container "8e97fc46adff" is unhealthy.
ERROR: Encountered errors while bringing up the project.
chadell commented 2 years ago

Addressed in #9