Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
Signed-off-by: Mathieu <[email protected]>
  • Loading branch information
mathieu-brl committed Dec 5, 2024
1 parent e749213 commit ec1ce93
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 22 deletions.
44 changes: 22 additions & 22 deletions server/build/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ services:
mariadb:
image: mariadb:10.4
ports:
- "3306:3306"
- "3305:3306"
environment:
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_DATABASE: ${DB_NAME}
Expand All @@ -31,30 +31,30 @@ services:
timeout: 5s
retries: 5

go-app:
build:
context: ../.
dockerfile: Dockerfile
ports:
- "8080:8080"
environment:
DB_HOST: mariadb
DB_PORT: 3306
DB_NAME: ${DB_NAME}
DB_USER: root
DB_PASSWORD: ${DB_PASSWORD}
SECRET_KEY: ${SECRET_KEY}
depends_on:
mariadb:
condition: service_healthy
rabbitmq:
condition: service_healthy
networks:
- app_network
# go-app:
# build:
# context: ../.
# dockerfile: Dockerfile
# ports:
# - "8080:8080"
# environment:
# DB_HOST: mariadb
# DB_PORT: 3306
# DB_NAME: ${DB_NAME}
# DB_USER: root
# DB_PASSWORD: ${DB_PASSWORD}
# SECRET_KEY: ${SECRET_KEY}
# depends_on:
# mariadb:
# condition: service_healthy
# rabbitmq:
# condition: service_healthy
# networks:
# - app_network

volumes:
mariadb_data:

networks:
app_network:
driver: bridge
driver: bridge
1 change: 1 addition & 0 deletions server/internal/models/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ import "gorm.io/gorm"
type Service struct {
gorm.Model
Label string `json:"label"`
Events []Event `gorm:"constraint:OnDelete:CASCADE;" json:"events"`
}
1 change: 1 addition & 0 deletions server/internal/models/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ type User struct {
Password string `gorm:"not null" json:"password" binding:"required"`
Salt string `gorm:"not null" json:"salt"`
Token string `gorm:"not null" json:"token"`
Workflows []Workflow `gorm:"constraint:OnDelete:CASCADE;"`
}

0 comments on commit ec1ce93

Please sign in to comment.