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

Update main #14

Merged
merged 242 commits into from
Jan 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
242 commits
Select commit Hold shift + click to select a range
c931578
fix: typo
Nitiwat-owen Dec 25, 2023
516a087
feat: draft auth service
Nitiwat-owen Dec 25, 2023
f6fd715
fix: update Signup signature
Nitiwat-owen Dec 25, 2023
780b357
feat: create AuthClientMock
Nitiwat-owen Dec 25, 2023
7089bbf
feat: write unit test for signup service
Nitiwat-owen Dec 25, 2023
6be4d66
fix: AuthClientMock
Nitiwat-owen Dec 25, 2023
48dea6f
feat: implement signup service
Nitiwat-owen Dec 25, 2023
83a1505
feat: generate auth.service mock
Nitiwat-owen Dec 25, 2023
73d65a5
feat: draft signup handler
Nitiwat-owen Dec 25, 2023
19db204
feat: generate user.service mock
Nitiwat-owen Dec 25, 2023
c3b8c12
feat: generate validator mock
Nitiwat-owen Dec 25, 2023
8e3cf80
feat: generate context mock
Nitiwat-owen Dec 25, 2023
fec768f
feat: write unit test for signup handler
Nitiwat-owen Dec 25, 2023
9a2cbfb
feat: implement signup handler
Nitiwat-owen Dec 25, 2023
a444647
fix: import package
Nitiwat-owen Dec 25, 2023
0c88068
fix: update context
Nitiwat-owen Dec 25, 2023
2338835
fix: router context
Nitiwat-owen Dec 26, 2023
e3863ee
feat: add api version
Nitiwat-owen Dec 26, 2023
2174678
chore: remove duplicate code
Nitiwat-owen Dec 26, 2023
1c9bc49
chore: create swagger doc
Nitiwat-owen Dec 26, 2023
62e0754
fix: swagger
Nitiwat-owen Dec 26, 2023
236475c
Merge pull request #2 from isd-sgcu/feature/signup
bookpanda Dec 26, 2023
2e2e409
feat: implement signIn service
Nitiwat-owen Dec 26, 2023
1a3a143
feat: write unit test for sign in handler
Nitiwat-owen Dec 26, 2023
7a2631d
feat: implement sign in handler
Nitiwat-owen Dec 26, 2023
4147deb
fix: signIn return type
Nitiwat-owen Dec 26, 2023
9188313
chore: update docs
Nitiwat-owen Dec 26, 2023
c06d8c6
fix: pet dto
macgeargear Dec 26, 2023
2c116ad
feat: find one service
macgeargear Dec 26, 2023
61136a3
feat: find one service without image
macgeargear Dec 26, 2023
b6d3d23
feat: update pet service
macgeargear Dec 26, 2023
4042a77
feat: delete pet service
macgeargear Dec 26, 2023
37dd578
feat: find one pet handler
macgeargear Dec 26, 2023
27fcc37
fix: remove CreatePetDto use PetDto instead
macgeargear Dec 26, 2023
8d8b499
feat: delete pet handler
macgeargear Dec 26, 2023
d6e9a0e
chore
macgeargear Dec 26, 2023
3357fed
fix: typo
macgeargear Dec 26, 2023
0f29ccb
feat: find all pet service
macgeargear Dec 26, 2023
197412f
feat: all pet service test skeleton
macgeargear Dec 27, 2023
f836e56
fix: method name
Nitiwat-owen Dec 27, 2023
572d34c
fix: auth service mock
Nitiwat-owen Dec 27, 2023
2538cc0
fix: failed test
Nitiwat-owen Dec 27, 2023
4d2d048
chore: rename sign in request dto
Nitiwat-owen Dec 27, 2023
8fd9841
feat: add setup test on pet service
macgeargear Dec 27, 2023
06e8e40
feat: add FindOne pet mock
macgeargear Dec 27, 2023
f4e862b
feat: add Create pet mock
macgeargear Dec 27, 2023
7d0d96e
feat: add Update & Delete pet mock
macgeargear Dec 27, 2023
a1fc0a2
feat: add contextmock
macgeargear Dec 27, 2023
140b1d0
feat: add clientMock & serviceMock
macgeargear Dec 27, 2023
7ed9f55
chore
macgeargear Dec 27, 2023
1a68a31
feat: TestFindOneNotFound(not pass) & TestFindOneGrpcErr
macgeargear Dec 27, 2023
7f914e6
feat: TestFindOneGrpcErr(failed)
macgeargear Dec 27, 2023
02135d5
feat: add image service in findOne
macgeargear Dec 28, 2023
67c86d3
feat: add create pet dto
macgeargear Dec 28, 2023
0ad976f
chore
macgeargear Dec 28, 2023
1909fe3
feat: CreatePetSuccess CreatePetGrpcError
macgeargear Dec 28, 2023
a7fe93e
Merge pull request #3 from isd-sgcu/feature/sign-in
bookpanda Dec 28, 2023
0db71a0
feat: implement signIn service
Nitiwat-owen Dec 26, 2023
55776fd
feat: write unit test for sign in handler
Nitiwat-owen Dec 26, 2023
437d42c
feat: implement sign in handler
Nitiwat-owen Dec 26, 2023
4990ec1
fix: signIn return type
Nitiwat-owen Dec 26, 2023
4ae8234
chore: update docs
Nitiwat-owen Dec 26, 2023
c14cf59
fix: method name
Nitiwat-owen Dec 27, 2023
e62f29c
fix: auth service mock
Nitiwat-owen Dec 27, 2023
73c9c9e
fix: failed test
Nitiwat-owen Dec 27, 2023
3a43399
chore: rename sign in request dto
Nitiwat-owen Dec 27, 2023
8a77cda
feat: find one pet handler
macgeargear Dec 29, 2023
4df4865
feat: image mock
macgeargear Dec 29, 2023
664d6c2
feat: add change view request dto
macgeargear Dec 29, 2023
069424f
fix: ChangeView function signature
macgeargear Dec 30, 2023
acfa586
feat: change view service
macgeargear Dec 30, 2023
c82d266
fix: wrong return type
macgeargear Dec 30, 2023
a8007bd
fix: wrong return type
macgeargear Dec 30, 2023
4667689
fix: function name
macgeargear Dec 30, 2023
a151b8e
fix: wroung status code
macgeargear Dec 30, 2023
79b8501
feat: find all mock
macgeargear Dec 30, 2023
7722340
fix: change context timeout
macgeargear Dec 30, 2023
24a9885
fix: change PetReq type
macgeargear Dec 30, 2023
9f49e22
fix: wrong function name
macgeargear Dec 30, 2023
eee58d7
feat: pet id in setup test, image url with empty string
macgeargear Dec 30, 2023
78ba7ae
fix: FindOne handler
macgeargear Dec 30, 2023
44667b8
fix: add `id` to pet dto
macgeargear Dec 30, 2023
05f33ee
chore
macgeargear Dec 30, 2023
f64173a
chore
macgeargear Dec 30, 2023
e90b070
chore
macgeargear Dec 30, 2023
7919f46
fix: setup test
macgeargear Dec 30, 2023
2156a8f
chore
macgeargear Dec 30, 2023
7a89c49
fix: called argument
macgeargear Dec 30, 2023
5cc2b99
feat: Test
macgeargear Dec 30, 2023
873427c
feat: TestFindOneInternalErr
macgeargear Dec 30, 2023
84a4667
feat: TestFindOneGrpcErr
macgeargear Dec 30, 2023
a6627e8
fix: change FinAll function signature to `c router.IContext`
macgeargear Dec 30, 2023
9952891
feat: CreateSuccess & CreateGrpcError
macgeargear Dec 30, 2023
54c57b7
chore
macgeargear Dec 30, 2023
bc9d5bb
feat: TestUpdateSuccess
macgeargear Dec 30, 2023
e7ff366
feat: TestUpdateSuccess
macgeargear Dec 30, 2023
744cf91
chore
macgeargear Dec 30, 2023
5612af0
chore
macgeargear Dec 30, 2023
b495323
fix: add update pet dto binding
macgeargear Dec 30, 2023
37ef856
feat: TestUpdateNotFound & TEstUpdateGrpcError
macgeargear Dec 30, 2023
d28ee44
fix: change context type
macgeargear Dec 30, 2023
b996027
feat: TestDeleteSuccess
macgeargear Dec 30, 2023
a0a0f3d
feat: TestDeleteNotFound & TestDeleteInvalidID
macgeargear Dec 30, 2023
696abcc
feat: TestDeleteGrpcError
macgeargear Dec 30, 2023
9530d3d
feat: TestChangeViewSuccess
macgeargear Dec 30, 2023
ad92340
fix: call
macgeargear Dec 30, 2023
d2d3ef4
feat: TestChangeViewNotFound
macgeargear Dec 30, 2023
f537d7e
feat: TestChangeViewGrpcError
macgeargear Dec 30, 2023
726ed1d
feat: TestChangeView
macgeargear Dec 30, 2023
a21811e
fix: call
macgeargear Dec 30, 2023
8f1ad5d
chore
macgeargear Dec 30, 2023
1dc27a2
chore
macgeargear Dec 30, 2023
bb3bb31
feat: ChangeView
macgeargear Dec 30, 2023
7eaf9fe
feat: Add change view pet dto
macgeargear Dec 30, 2023
5df7e95
feat: TestChangeView
macgeargear Dec 30, 2023
e8dd735
fix: ChangeView params
macgeargear Dec 30, 2023
b478d1d
feat: FindAll Pet mock
macgeargear Dec 30, 2023
62a5eb6
feat: FindAllSuccess
macgeargear Dec 30, 2023
fd3797d
feat: TestFindAllSuccess
macgeargear Dec 30, 2023
49dfd38
fix: FindAll pet handler
macgeargear Dec 30, 2023
b01985e
fix: use go-faker instead of bxcodec
bookpanda Dec 31, 2023
0462a06
chore: mod tidy
bookpanda Dec 31, 2023
a58f485
Merge branch 'dev' into feature/pet
bookpanda Dec 31, 2023
099a4cd
feat: update proto version
Nitiwat-owen Jan 1, 2024
1ec6406
feat: implement sign out service
Nitiwat-owen Jan 1, 2024
b7096a6
feat: mock-gen for pet service
macgeargear Jan 1, 2024
96d0561
chore: remove unused code
macgeargear Jan 1, 2024
f6fd7c5
feat: add pet service interface
macgeargear Jan 1, 2024
f4ef5db
fix: re write all unit test for new pet client mock
macgeargear Jan 1, 2024
c2338d9
chore: add log in FindAll
macgeargear Jan 1, 2024
52e0a8a
chore
macgeargear Jan 1, 2024
a0c4bc4
chore
macgeargear Jan 1, 2024
917958f
fix: change view dto
macgeargear Jan 2, 2024
a909e86
fix: Handler
macgeargear Jan 2, 2024
c21b616
chore: change view
macgeargear Jan 2, 2024
e4c6222
fix: TestChangeViewSuccess
macgeargear Jan 2, 2024
492ab77
chore
macgeargear Jan 2, 2024
f22ca8d
fix: change view arguments
macgeargear Jan 2, 2024
900ac2f
feat: add mockgen for pet service
macgeargear Jan 2, 2024
2253cc7
feat: image interface for mock
macgeargear Jan 2, 2024
8752b06
feat: gen mock
macgeargear Jan 2, 2024
3e82599
chore
macgeargear Jan 2, 2024
5b46b3e
feat: add image mock
macgeargear Jan 2, 2024
3646d1b
chore
macgeargear Jan 2, 2024
47bca37
chore: typo
macgeargear Jan 2, 2024
1bcf912
chore: add function argument
macgeargear Jan 2, 2024
29c6ae5
fix: image service type
macgeargear Jan 2, 2024
bbda0aa
fix: function argument
macgeargear Jan 2, 2024
9455f73
feat: pet routes
macgeargear Jan 2, 2024
79f48f0
feat: custom unmarshalJSON for `Status` and `Gender`
macgeargear Jan 2, 2024
12f3def
chore: function argument
macgeargear Jan 2, 2024
56ff9a5
feat: pet group router
macgeargear Jan 2, 2024
28a9d17
fix: add required tag for `CreatePetDto`
macgeargear Jan 2, 2024
c2a0910
chore
macgeargear Jan 2, 2024
13b3358
chore
macgeargear Jan 2, 2024
9af0707
feat: invalid argument constant
macgeargear Jan 2, 2024
911b5bd
fix: add test coresponding to errors in pet service
macgeargear Jan 2, 2024
8585673
fix: Implement comprehensive error validation for all functions
macgeargear Jan 2, 2024
0028bc4
fix: remvoe unused code
macgeargear Jan 2, 2024
001acc6
chore
macgeargear Jan 2, 2024
7d742c6
feat: implement sign out handler
Nitiwat-owen Jan 2, 2024
67e51ce
chore: update docs
Nitiwat-owen Jan 2, 2024
0282674
chore: remove adopt service and handler
Nitiwat-owen Jan 2, 2024
42e8138
fix: unit test
Nitiwat-owen Jan 2, 2024
c866c52
chore
macgeargear Jan 2, 2024
b16dda6
fix: log
macgeargear Jan 3, 2024
ac295aa
feat: add find all doc description
macgeargear Jan 3, 2024
e219ec2
fix: update pet missing id in request
macgeargear Jan 3, 2024
fe06f89
feat: add log for sign up action
Nitiwat-owen Jan 3, 2024
74bad3b
feat: add log for sign in method
Nitiwat-owen Jan 3, 2024
b60d26a
feat: add log for sign out method
Nitiwat-owen Jan 3, 2024
3d4afce
fix: unit test
Nitiwat-owen Jan 3, 2024
cec8bf7
Merge pull request #5 from isd-sgcu/JOH-26/sign-out
Nitiwat-owen Jan 4, 2024
1bf926a
feat: implement validate service
Nitiwat-owen Jan 3, 2024
abdfcd2
feat: add Validate method in middleware
Nitiwat-owen Jan 3, 2024
70483e7
fix: middleware
Nitiwat-owen Jan 3, 2024
9d42b9b
fix: token
Nitiwat-owen Jan 3, 2024
f8da32d
fix: change boolean type
macgeargear Jan 4, 2024
4d0b57f
fix: bool type
macgeargear Jan 4, 2024
3f8c546
fix: wrong handler
macgeargear Jan 4, 2024
9b20602
chore: update proto
macgeargear Jan 4, 2024
0d90a6b
chore
macgeargear Jan 4, 2024
709b93e
feat: docs
macgeargear Jan 4, 2024
29a9d9e
Merge branch 'dev' into feature/pet
macgeargear Jan 4, 2024
d3e5d4d
fest: add adopt field
macgeargear Jan 4, 2024
025e1b8
chore: update image proto
macgeargear Jan 4, 2024
a6514ef
chore: add adopt to test
macgeargear Jan 4, 2024
bf12a40
chore: add AdoptMock
macgeargear Jan 4, 2024
b910180
chore
macgeargear Jan 4, 2024
51bbb97
feat: adopt service
macgeargear Jan 4, 2024
4483249
chore: fix import
macgeargear Jan 4, 2024
42b9077
chore: update image proto
macgeargear Jan 4, 2024
649495c
chore
macgeargear Jan 4, 2024
09c4a9f
chore: fix docs
macgeargear Jan 4, 2024
f9e4a26
Merge pull request #4 from isd-sgcu/feature/pet
macgeargear Jan 4, 2024
d2131ec
feat: add file service docker
bookpanda Jan 4, 2024
7542ffe
fix: host name
bookpanda Jan 4, 2024
a5b4bab
fix: container name
bookpanda Jan 4, 2024
f09b7fd
feat: add build workflow
bookpanda Jan 4, 2024
b01d66b
feat: update readme
bookpanda Jan 4, 2024
ec844f5
fix: volume path
bookpanda Jan 4, 2024
8e36519
feat: backend config
bookpanda Jan 4, 2024
99eca68
chore: chore
Nitiwat-owen Jan 4, 2024
d930f03
fix: readme
bookpanda Jan 4, 2024
2e3d363
fix: file port
bookpanda Jan 4, 2024
58c9213
fix: remove linux/amd64
bookpanda Jan 4, 2024
f3d9c41
Merge pull request #6 from isd-sgcu/JOH-26/validate
Nitiwat-owen Jan 4, 2024
72bbbd4
feat: implement refresh token service
Nitiwat-owen Jan 3, 2024
6aeb3b6
feat: implement refresh token handler
Nitiwat-owen Jan 3, 2024
2f52a2a
chore: update docs
Nitiwat-owen Jan 3, 2024
6934623
chore: chore
Nitiwat-owen Jan 4, 2024
597e40e
fix: unit test
Nitiwat-owen Jan 4, 2024
9de7f73
feat: add backend, auth in compose
bookpanda Jan 4, 2024
5f3cdb2
feat: add auth config
bookpanda Jan 4, 2024
cbecf21
Merge pull request #9 from isd-sgcu/JOH-26/refresh-token
Nitiwat-owen Jan 4, 2024
96725e6
fix: change dto
macgeargear Jan 4, 2024
9caac0e
fix: change dto
macgeargear Jan 4, 2024
4bafcad
chore: gen mock
macgeargear Jan 4, 2024
3193843
fix: change dto
macgeargear Jan 4, 2024
e71aba4
feat: ResponseSuccess dto
macgeargear Jan 4, 2024
2e0fdd6
fix: change dto
macgeargear Jan 4, 2024
1a6a780
feat: add ResponseSuccess dto
macgeargear Jan 4, 2024
ff0cee4
fix: change dto
macgeargear Jan 4, 2024
0663597
chore
macgeargear Jan 4, 2024
e0f76e6
feat: function for generate image proto
macgeargear Jan 4, 2024
fbc20e2
fix: mock images
macgeargear Jan 4, 2024
6630f29
chore
macgeargear Jan 4, 2024
bf45b54
fix: package names/aliases
bookpanda Jan 5, 2024
038f269
fix: package aliases
bookpanda Jan 5, 2024
dfbf892
fix: remove mockImages use mockImagesList instead and use constant va…
macgeargear Jan 5, 2024
acaa8a7
chore: fix test
macgeargear Jan 5, 2024
cbb10be
chore
macgeargear Jan 5, 2024
30c2095
fix: return type dot `dto.ResponseSuccess`
macgeargear Jan 5, 2024
91bfa89
fix: return type to `dto.ResponseSuccess`
macgeargear Jan 5, 2024
e4bc7ea
chore: change `Raw` -> `Proto`
macgeargear Jan 5, 2024
98d1ea1
Merge pull request #10 from isd-sgcu/gear/joh-28-pet-and-like-endpoints
macgeargear Jan 5, 2024
5740f10
Merge branch 'dev' into JOH-37/docker
bookpanda Jan 5, 2024
6b487dc
Revert "Merge branch 'dev' into JOH-37/docker"
bookpanda Jan 5, 2024
4078153
Revert "Revert "Merge branch 'dev' into JOH-37/docker""
bookpanda Jan 5, 2024
58dd9d7
fix: build workflow set output
bookpanda Jan 6, 2024
c33bc0f
Merge pull request #8 from isd-sgcu/JOH-37/docker
bookpanda Jan 6, 2024
7737307
fix: build pkg add platform
bookpanda Jan 6, 2024
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
55 changes: 55 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build

on:
workflow_dispatch:
push:
branches:
- main
- beta
- dev
- master

env:
IMAGE_NAME: ghcr.io/${{ github.repository }}
IMAGE_TAG: ${{ github.sha }}

jobs:
build:
name: Build
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

outputs:
BRANCH: ${{ steps.branch.outputs.BRANCH }}

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Set branch
id: branch
run: |
echo "BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT

- name: Log in to the Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and Push Docker Image
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }},${{ env.IMAGE_NAME }}:latest
cache-from: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache
cache-to: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache,mode=max
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,14 @@ test:

server:
go run ./src/.

mock-gen:
mockgen -source ./src/pkg/service/auth/auth.service.go -destination ./src/mocks/service/auth/auth.mock.go
mockgen -source ./src/pkg/service/user/user.service.go -destination ./src/mocks/service/user/user.mock.go
mockgen -source ./src/pkg/service/pet/pet.service.go -destination ./src/mocks/service/pet/pet.mock.go
mockgen -source ./src/pkg/service/image/image.service.go -destination ./src/mocks/service/image/image.mock.go
mockgen -source ./src/app/validator/validator.go -destination ./src/mocks/validator/validator.mock.go
mockgen -source ./src/app/router/context.go -destination ./src/mocks/router/context.mock.go

create-doc:
swag init -d ./src -o ./src/docs -md ./src/docs/markdown
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Johnjud-gateway

Johnjud-gateway is a routing and request handling service for the Johnjud project.

### What is Johnjud?
Johnjud is a pet adoption web application of the [CUVET For Animal Welfare Club](https://www.facebook.com/CUVETforAnimalWelfareClub)

## Stack

- golang
Expand All @@ -17,7 +22,7 @@
### Installation

1. Clone this repo
2. Copy `config.example.yaml` in `config` and paste it in the same directory with `.example` removed from its name.
2. Copy every `config.example.yaml` in `config` and paste it in the same directory with `.example` removed from its name.

3. Run `go mod download` to download all the dependencies.

Expand All @@ -27,3 +32,12 @@

### Testing
1. Run `make test` or `go test -v -coverpkg ./... -coverprofile coverage.out -covermode count ./...`

## Other microservices/repositories of Johnjud
- [Johnjud-gateway](https://github.com/isd-sgcu/johnjud-gateway): Routing and request handling
- [Johnjud-auth](https://github.com/isd-sgcu/johnjud-auth): Authentication and authorization
- [Johnjud-backend](https://github.com/isd-sgcu/johnjud-backend): Main business logic
- [Johnjud-file](https://github.com/isd-sgcu/johnjud-file): File management service
- [Johnjud-proto](https://github.com/isd-sgcu/johnjud-proto): Protobuf files generator
- [Johnjud-go-proto](https://github.com/isd-sgcu/johnjud-go-proto): Generated protobuf files for golang
- [Johnjud-frontend](https://github.com/isd-sgcu/johnjud-frontend): Frontend web application
23 changes: 23 additions & 0 deletions config/auth/config.example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
app:
port: 3002
debug: true
secret: <secret>

database:
host: localhost
port: 5432
name: johnjud_db
username: root
password: root

jwt:
secret: <secret>
expires_in: 3600
refresh_token_ttl: 604800
issuer: <issuer>

redis:
host: localhost
port: 6379
password: ""
dbnum: 0
13 changes: 13 additions & 0 deletions config/backend/config.example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
app:
port: 3003
debug: true

database:
host: local-db
port: 5432
name: johnjud_db
username: root
password: root

service:
file: file:3004
14 changes: 14 additions & 0 deletions config/file/config.example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
app:
port: 3004
debug: true

database:
host: local-db
port: 5432
name: johnjud_db
username: root
password: root

s3:
bucket_name: <bucket name>
region: <region>
80 changes: 80 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
version: "3.9"

services:
local-auth:
image: ghcr.io/isd-sgcu/johnjud-auth
container_name: auth
depends_on:
- local-db
- local-cache
restart: unless-stopped
networks:
- johnjud-local
- database
volumes:
- ./config/auth:/app/config
ports:
- "3002:3002"

local-backend:
image: ghcr.io/isd-sgcu/johnjud-backend
container_name: backend
depends_on:
- local-db
- local-cache
restart: unless-stopped
networks:
- johnjud-local
- database
volumes:
- ./config/backend:/app/config
ports:
- "3003:3003"

local-file:
image: ghcr.io/isd-sgcu/johnjud-file
container_name: file
depends_on:
- local-db
- local-cache
restart: unless-stopped
networks:
- johnjud-local
- database
volumes:
- ./config/file:/app/config
ports:
- "3004:3004"

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:
- ./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
ALLOW_EMPTY_PASSWORD: "yes"
networks:
- database
ports:
- "6379:6379"

networks:
johnjud-local:
name: johnjud-local
database:
name: database
38 changes: 19 additions & 19 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,45 +4,47 @@ go 1.21.3

require (
github.com/arsmn/fiber-swagger/v2 v2.31.1
github.com/bxcodec/faker/v4 v4.0.0-beta.3
github.com/go-faker/faker/v4 v4.2.0
github.com/go-playground/locales v0.14.1
github.com/go-playground/universal-translator v0.18.1
github.com/go-playground/validator/v10 v10.16.0
github.com/gofiber/fiber/v2 v2.51.0
github.com/gofiber/fiber/v2 v2.52.0
github.com/golang/mock v1.6.0
github.com/google/uuid v1.5.0
github.com/isd-sgcu/johnjud-go-proto v0.0.8
github.com/isd-sgcu/johnjud-go-proto v0.2.2
github.com/pkg/errors v0.9.1
github.com/rs/zerolog v1.31.0
github.com/spf13/viper v1.18.2
github.com/stretchr/testify v1.8.4
github.com/swaggo/swag v1.16.2
google.golang.org/grpc v1.60.1
)

require (
github.com/KyleBanks/depth v1.2.1 // indirect
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/andybalholm/brotli v1.0.5 // indirect
github.com/andybalholm/brotli v1.0.6 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.19.6 // indirect
github.com/go-openapi/spec v0.20.4 // indirect
github.com/go-openapi/swag v0.19.15 // indirect
github.com/go-openapi/jsonpointer v0.20.2 // indirect
github.com/go-openapi/jsonreference v0.20.4 // indirect
github.com/go-openapi/spec v0.20.13 // indirect
github.com/go-openapi/swag v0.22.7 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/klauspost/compress v1.17.0 // indirect
github.com/klauspost/compress v1.17.4 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mailru/easyjson v0.7.6 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
Expand All @@ -51,22 +53,20 @@ require (
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/swaggo/files v0.0.0-20210815190702-a29dd2bc99b2 // indirect
github.com/swaggo/swag v1.8.1 // indirect
github.com/swaggo/files v1.0.1 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasthttp v1.50.0 // indirect
github.com/valyala/fasthttp v1.51.0 // indirect
github.com/valyala/tcplisten v1.0.0 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.9.0 // indirect
golang.org/x/crypto v0.16.0 // indirect
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.13.0 // indirect
golang.org/x/tools v0.16.1 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect
google.golang.org/protobuf v1.31.0 // indirect
google.golang.org/protobuf v1.32.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading
Loading