diff options
| -rw-r--r-- | README.md | 13 | ||||
| -rw-r--r-- | docker-compose.yml | 11 |
2 files changed, 13 insertions, 11 deletions
@@ -4,13 +4,12 @@ ## Running the Project -This project uses Docker for building, testing, and running the application. Below are the instructions to incorporate -this project into your build system using Docker. +This project uses Docker for containerization. -### Prerequisites +### Docker CLI Version -- Docker (version 20.10 or later) -- Docker Compose (version 1.29 or later) +The project uses the latest version of the Docker CLI (version 27.1), which includes the integrated `docker compose` +command for managing multi-container Docker applications. ### Build @@ -27,7 +26,7 @@ This command will build the application image using the Dockerfile defined in th To run the tests using Docker, use the following command: ```shell -docker compose run --rm markr_tests +docker compose run --rm tests ``` This command will build the Docker image (if not already built), start a container for testing, and run the tests. The @@ -38,7 +37,7 @@ This command will build the Docker image (if not already built), start a contain To run the application, use the following command: ```shell -docker compose up postgres markr +docker compose up postgres service ``` This command will start the application and its dependencies (like PostgreSQL) as defined in the docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml index cb7bc7e..ebfe4c0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,3 +1,5 @@ +name: skasio_markr + services: postgres: image: postgres:latest @@ -11,11 +13,11 @@ services: volumes: - postgres_data:/var/lib/postgresql/data - markr: + service: build: context: . dockerfile: Dockerfile - container_name: skasio_markr + container_name: markr-service ports: - "8080:8080" depends_on: @@ -25,11 +27,11 @@ services: SPRING_DATASOURCE_USERNAME: markr_prod SPRING_DATASOURCE_PASSWORD: CpfzDA3nR3jH9Ky4 - markr_tests: + tests: build: context: . dockerfile: Dockerfile.test - container_name: skasio_markr_tests + container_name: markr-tests environment: SPRING_DATASOURCE_URL: jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE SPRING_DATASOURCE_USERNAME: markr_test @@ -42,3 +44,4 @@ services: volumes: postgres_data: + name: markr_postgres_data
\ No newline at end of file |
