Skip to content
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

udpate main #42

Merged
merged 4 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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:
Loading