mirror of
				https://github.com/zoriya/Kyoo.git
				synced 2025-10-31 02:27:11 -04:00 
			
		
		
		
	Use docker-compose watch mode for auth
				
					
				
			This commit is contained in:
		
							parent
							
								
									e5b1842432
								
							
						
					
					
						commit
						4828fa08cf
					
				| @ -1,10 +1,9 @@ | ||||
| Dockerfile* | ||||
| *.md | ||||
| .dockerignore | ||||
| .gitignore | ||||
| .env* | ||||
| 
 | ||||
| ** | ||||
| !/go.mod | ||||
| !/go.sum | ||||
| !/**.go | ||||
| # generated via sqlc | ||||
| dbc/ | ||||
| !/sql | ||||
| !/dbc | ||||
| # genereated via swag | ||||
| docs/ | ||||
| !/docs | ||||
|  | ||||
| @ -1,18 +1,10 @@ | ||||
| FROM golang:1.24 AS build | ||||
| WORKDIR /app | ||||
| 
 | ||||
| RUN go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest | ||||
| RUN go install github.com/swaggo/swag/cmd/swag@latest | ||||
| 
 | ||||
| COPY go.mod go.sum ./ | ||||
| RUN go mod download | ||||
| 
 | ||||
| COPY sqlc.yaml ./ | ||||
| COPY sql ./sql | ||||
| RUN sqlc generate | ||||
| 
 | ||||
| COPY . . | ||||
| RUN swag init --parseDependency --outputTypes json,go | ||||
| RUN CGO_ENABLED=0 GOOS=linux go build -o /keibi | ||||
| 
 | ||||
| FROM gcr.io/distroless/base-debian11 | ||||
| @ -23,5 +15,4 @@ USER nonroot:nonroot | ||||
| COPY --from=build /keibi /app/keibi | ||||
| COPY sql ./sql | ||||
| 
 | ||||
| HEALTHCHECK --interval=30s --retries=15 CMD curl --fail http://localhost:4568$KEIBI_PREFIX/health || exit | ||||
| CMD ["/app/keibi"] | ||||
|  | ||||
| @ -1,11 +1,10 @@ | ||||
| FROM golang:1.24 AS build | ||||
| WORKDIR /app | ||||
| 
 | ||||
| RUN go install github.com/bokwoon95/wgo@latest | ||||
| 
 | ||||
| COPY go.mod go.sum ./ | ||||
| RUN go mod download | ||||
| 
 | ||||
| COPY . . | ||||
| 
 | ||||
| EXPOSE 4568 | ||||
| HEALTHCHECK --interval=30s --retries=15 CMD curl --fail http://localhost:4568$KEIBI_PREFIX/health || exit | ||||
| CMD ["wgo", "run", "-race", "."] | ||||
| CMD ["go", "run", "-race", "."] | ||||
|  | ||||
| @ -21,26 +21,26 @@ x-transcoder: &transcoder-base | ||||
|     - transcoder_metadata:/metadata | ||||
| 
 | ||||
| services: | ||||
|   front: | ||||
|     build: | ||||
|       context: ./front | ||||
|       dockerfile: Dockerfile.dev | ||||
|     volumes: | ||||
|       - ./front:/app | ||||
|       - /app/.yarn | ||||
|       - /app/node_modules | ||||
|       - /app/apps/mobile/node_modules | ||||
|       - /app/apps/web/.next/ | ||||
|       - /app/apps/mobile/.expo/ | ||||
|     ports: | ||||
|       - "3000:3000" | ||||
|       - "8081:8081" | ||||
|     restart: on-failure | ||||
|     environment: | ||||
|       - KYOO_URL=${KYOO_URL:-http://api:5000/api} | ||||
|     labels: | ||||
|       - "traefik.enable=true" | ||||
|       - "traefik.http.routers.front.rule=PathPrefix(`/`)" | ||||
|   # front: | ||||
|   #   build: | ||||
|   #     context: ./front | ||||
|   #     dockerfile: Dockerfile.dev | ||||
|   #   volumes: | ||||
|   #     - ./front:/app | ||||
|   #     - /app/.yarn | ||||
|   #     - /app/node_modules | ||||
|   #     - /app/apps/mobile/node_modules | ||||
|   #     - /app/apps/web/.next/ | ||||
|   #     - /app/apps/mobile/.expo/ | ||||
|   #   ports: | ||||
|   #     - "3000:3000" | ||||
|   #     - "8081:8081" | ||||
|   #   restart: on-failure | ||||
|   #   environment: | ||||
|   #     - KYOO_URL=${KYOO_URL:-http://api:5000/api} | ||||
|   #   labels: | ||||
|   #     - "traefik.enable=true" | ||||
|   #     - "traefik.http.routers.front.rule=PathPrefix(`/`)" | ||||
| 
 | ||||
|   auth: | ||||
|     build: | ||||
| @ -54,13 +54,14 @@ services: | ||||
|       - "4568:4568" | ||||
|     env_file: | ||||
|       - ./.env | ||||
|     environment: | ||||
|       - KEIBI_PREFIX=/auth | ||||
|     volumes: | ||||
|       - ./auth:/app | ||||
|     labels: | ||||
|       - "traefik.enable=true" | ||||
|       - "traefik.http.routers.auth.rule=PathPrefix(`/auth/`) || PathPrefix(`/.well-known/`)" | ||||
|     develop: | ||||
|       watch: | ||||
|         - action: sync+restart | ||||
|           path: ./auth | ||||
|           target: /app | ||||
| 
 | ||||
|   api: | ||||
|     build: | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user