Skip to content

Commit

Permalink
Merge pull request #42 from isd-sgcu/dev
Browse files Browse the repository at this point in the history
udpate main
  • Loading branch information
bookpanda authored Aug 23, 2024
2 parents 9236f53 + 49eb4a9 commit 0ac39fb
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 230 deletions.
2 changes: 1 addition & 1 deletion .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ JWT_RESET_TOKEN_TTL=900

REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=
REDIS_PASSWORD=5678

AUTH_CLIENT_URL=http://localhost:3000

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ test:
server:
go run ./cmd/.

docker-qa:
docker-compose -f docker-compose.qa.yaml up
docker:
docker-compose up

mock-gen:
mockgen -source ./internal/cache/cache.repository.go -destination ./mocks/repository/cache/cache.mock.go
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Johnjud is a pet adoption web application of the [CUVET For Animal Welfare Club]
3. Run `go mod download` to download all the dependencies.

### Running
1. Run `docker-compose -f docker-compose.example.yaml up`
1. Run `docker-compose up`
2. Run `make server` or `go run ./cmd/.`

### Testing
Expand Down
2 changes: 1 addition & 1 deletion database/postgresql.connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func InitPostgresDatabase(conf *config.Database, isDebug bool) (db *gorm.DB, err
return nil, err
}

err = db.AutoMigrate(&model.User{}, &model.AuthSession{})
err = db.AutoMigrate(&model.User{}, &model.AuthSession{}, &model.Pet{}, &model.Image{})
if err != nil {
return nil, err
}
Expand Down
120 changes: 0 additions & 120 deletions docker-compose-prod.yaml

This file was deleted.

105 changes: 0 additions & 105 deletions docker-compose.example.yaml

This file was deleted.

36 changes: 36 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
version: "3.9"

services:
local-db:
image: postgres:15.1-alpine3.17
container_name: local-db
restart: unless-stopped
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: root
POSTGRES_DB: johnjud_db
networks:
- database
volumes:
- postgres:/var/lib/postgresql/data
ports:
- "5432:5432"

local-cache:
image: redis:7.2.3-alpine
container_name: local-cache
restart: unless-stopped
environment:
REDIS_HOST: localhost
REDIS_PASSWORD: 5678
networks:
- database
ports:
- "6379:6379"

networks:
database:
name: database

volumes:
postgres:

0 comments on commit 0ac39fb

Please sign in to comment.