Skip to content

Commit

Permalink
fix: docker installation
Browse files Browse the repository at this point in the history
  • Loading branch information
andrechristikan committed Nov 10, 2024
1 parent 484bba6 commit 424afb4
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 6 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ _You can [request feature][ack-issues] or [report bug][ack-issues] with followin
- [Database Migration and Seed](#database-migration-and-seed)
- [Template Migration](#template-migration)
- [Run Project](#run-project)
- [Installation dependencies with Docker](#installation-dependencies-with-docker)
- [Installation with Docker](#installation-with-docker)
- [Test](#test)
- [Swagger](#swagger)
- [API Key](#api-key)
Expand Down Expand Up @@ -207,16 +207,19 @@ Now you can run the project.
yarn start:dev
```

## Installation dependencies with Docker

> Docker will install mongodb (as replication set), and redis
## Installation with Docker

We need more tools to be installed.

1. [Docker][ref-docker]
2. [Docker-Compose][ref-dockercompose]

After clone this project, then run
Copy `.env.example` and change value

1. `DATABASE_URL`: `DATABASE_URL=mongodb://host.docker.internal:27017,host.docker.internal:27018,host.docker.internal:27019/ack?retryWrites=true&w=majority&replicaSet=rs0`
2. `REDIS_HOST`: `redis`

leave the rest as it, then run

```bash
docker-compose up -d
Expand Down
17 changes: 17 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@ name: ack

services:

apis:
build:
context: .
container_name: apis
hostname: apis
ports:
- 3000:3000
volumes:
- ./src/:/app/src/
- .env/:/app/.env
restart: always
networks:
- app-network
depends_on:
- redis
- mongodb1

redis:
image: redis:latest
container_name: redis
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ack-nestjs-boilerplate",
"version": "7.1.2",
"version": "7.1.3",
"description": "Ack NestJs Boilerplate",
"repository": {
"type": "git",
Expand Down

0 comments on commit 424afb4

Please sign in to comment.