Project-Books / books-api

GraphQL Books API
https://project-books.github.io/#books-api
MIT License
35 stars 61 forks source link

Dockerise backend #134

Closed knjk04 closed 2 years ago

knjk04 commented 2 years ago

We should dockerise the backend to make it easier for people, particularly our frontend developers, to get this running without needing to set things up (e.g. install the JDK, etc.). It should also start and run our PostgreSQL database.

Use a minimal Alpine distribution to run the Spring app.

For our development environment, we can use the preset Postgres credentials (username, password, host, etc.).

knjk04 commented 2 years ago

@Wildschut Could you reply that you're interested in picking this up so that your name appears in the assignees list for me to assign this to you?

Wildschut commented 2 years ago

Hi, yes I'm interested.

Wildschut commented 2 years ago

Somefeed back on myside.

Dockerfile is creating the image successfully with static variables

Busy with adding db validation to support passing db env vars to container.

Right now its only postgres but I'm seeing in the prod profile references to mysql. Am I correct to assume that the container, when running in production, should make provision for either postgres or mysql?

knjk04 commented 2 years ago

Right now its only postgres but I'm seeing in the prod profile references to mysql. Am I correct to assume that the container, when running in production, should make provision for either postgres or MySQL?

We've recently moved from MySQL to Postgres, so it should be postgres. I'll look to change any old MySQL references. Thanks for the heads up!