Skip to content

feat: Add Docker and docker-compose.yml #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 22, 2025
Merged

Conversation

thorlauridsen
Copy link
Owner

  • Add Dockerfile which will build a runnable docker image for the api subproject.
  • Add PostgreSQL Gradle dependency.
  • Update application.yml to include environment variables for the datasource. The default values will be for the H2 in-memory database but you can configure these environment variables to connect to a PostgreSQL database instead.
  • Add docker-compose.yml which will run a PostgreSQL image and build the Spring Boot instance from the Dockerfile and run everything together.

This allows you to run the entire project with a PostgreSQL database using:

docker compose up -d

- Add `Dockerfile` which will build a runnable docker image for the `api` subproject.
- Add PostgreSQL Gradle dependency.
- Update `application.yml` to include environment variables for the datasource. The default values will be for the H2 in-memory database but you can configure these environment variables to connect to a PostgreSQL database instead.
- Add `docker-compose.yml` which will run a PostgreSQL image and build the Spring Boot instance from the `Dockerfile` and run everything together.

This allows you to run the entire project with a PostgreSQL database using:
```
docker compose up -d
```
@thorlauridsen thorlauridsen added the enhancement New feature or request label Mar 22, 2025
@thorlauridsen thorlauridsen self-assigned this Mar 22, 2025
@thorlauridsen thorlauridsen merged commit 5820ad1 into main Mar 22, 2025
1 check passed
@thorlauridsen thorlauridsen deleted the add-docker branch March 22, 2025 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant