ugent-library / old-people-service

People service
Apache License 2.0
0 stars 0 forks source link

Dockerfile should be exactly same as oai-service #58

Open netsensei opened 1 year ago

netsensei commented 1 year ago

Last 5 lines in the current Dockerfile reads:

WORKDIR /opt/people-service
COPY --from=build /opt/people-service/people-service .
COPY --from=build /opt/people-service/public public
CMD mkdir -p api/v1
COPY --from=build /opt/people-service/api/v1/openapi.yaml /opt/people-service/api/v1/

OAI service does it like this:

RUN go build -o app -v

etc...

WORKDIR /dist
COPY --from=build /build .
EXPOSE 3000
CMD ["/dist/app", "app"]

Last bullet point: the openapi.yaml file is automatically copied into the container. It should be automatically picked up.

nicolasfranck commented 1 year ago

@netsensei well have a look at the contents in the docker instance of the oai-service-dev (I just had a look in the running container over ssh):

/dist # ls
Dockerfile           cli                  oaipmh
LICENSE              ent                  public
Makefile             go.mod               reflex.conf.example
README.md            go.sum               repositories
api                  hooks
app                  main.go
/dist 

all of the development files are also there. You have to pick and choose what to copy.

About the naming and location of the binary: no idea. I tend to keep names recognizable. What is the hell is app?

nicolasfranck commented 1 year ago

BTW this looks more like a discussion, not?