fix up some docker build issues re pathing
This commit is contained in:
4
.dockerignore
Normal file
4
.dockerignore
Normal file
@@ -0,0 +1,4 @@
|
||||
dist
|
||||
rush-character-archive/node_modules
|
||||
vault/node_modules
|
||||
vault/src/proto
|
||||
@@ -3,7 +3,9 @@ networks:
|
||||
|
||||
services:
|
||||
rush-character-archive:
|
||||
build: ./rush-character-archive
|
||||
build:
|
||||
context: ./
|
||||
dockerfile: ./rush-character-archive/Dockerfile
|
||||
command: npm run dev
|
||||
networks:
|
||||
- rush-character-net
|
||||
@@ -21,7 +23,9 @@ services:
|
||||
- action: rebuild
|
||||
path: ./rush-character-archive/Dockerfile
|
||||
vault:
|
||||
build: ./vault
|
||||
build:
|
||||
context: ./
|
||||
dockerfile: ./vault/Dockerfile
|
||||
command: npm run dev
|
||||
networks:
|
||||
- rush-character-net
|
||||
|
||||
@@ -2,13 +2,13 @@ FROM node:22.16
|
||||
|
||||
WORKDIR /srv/rush-character-archive
|
||||
|
||||
COPY package.json .
|
||||
COPY rush-character-archive/package.json .
|
||||
|
||||
RUN npm install
|
||||
|
||||
RUN npm i -g serve
|
||||
|
||||
COPY . .
|
||||
COPY rush-character-archive/. .
|
||||
|
||||
RUN npm run build
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ RUN npm install
|
||||
COPY vault .
|
||||
|
||||
RUN npm install -g protoc
|
||||
RUN npm install -g protoc-gen-js
|
||||
RUN npm install -g protoc-gen-ts
|
||||
|
||||
RUN npm run build
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
"description": "backend for rush cahracter archive",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"build_protos": "mkdir src/proto & npx protoc -I=../proto --ts_out=src/proto ../proto/*",
|
||||
"build": "mkdir src/proto & npx protoc -I=../proto --ts_out=src/proto ../proto/* & tsc",
|
||||
"start": "mkdir src/proto & npx protoc -I=../proto --ts_out=src/proto ../proto/* & tsc && node dist/app.js",
|
||||
"dev": "mkdir src/proto & npx protoc -I=../proto --ts_out=src/proto ../proto/* & npx ts-node-dev src/app.ts",
|
||||
"build_protos": "mkdir -p src/proto & npx protoc -I=../proto --ts_out=src/proto ../proto/*",
|
||||
"build": "mkdir -p src/proto & npx protoc -I=../proto --ts_out=src/proto ../proto/* & tsc",
|
||||
"start": "mkdir -p src/proto & npx protoc -I=../proto --ts_out=src/proto ../proto/* & tsc && node dist/app.js",
|
||||
"dev": "mkdir -p src/proto & npx protoc -I=../proto --ts_out=src/proto ../proto/* & npx ts-node-dev src/app.ts",
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"format": "npx prettier . --write",
|
||||
"lint": "npx eslint . --ext .ts"
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
// import express from 'express'
|
||||
import * as grpc from '@grpc/grpc-js'
|
||||
|
||||
// import { Character } from './proto/character'
|
||||
import { initCharacterService } from './character_service'
|
||||
|
||||
const port = 8000;
|
||||
@@ -12,15 +10,4 @@ initCharacterService(app)
|
||||
|
||||
app.bindAsync("0.0.0.0:8000", grpc.ServerCredentials.createInsecure(), () => {
|
||||
console.log("Starting server at 0.0.0.0:8000")
|
||||
})
|
||||
|
||||
// const app = express()
|
||||
|
||||
// app.get('/api/person', async (req, res) => {
|
||||
// res.status(200).send('potato!')
|
||||
// })
|
||||
|
||||
// app.listen(port, async () => {
|
||||
// console.log(`Express is listening at http://localhost:${port}`)
|
||||
// return
|
||||
// })
|
||||
})
|
||||
@@ -1,7 +1,10 @@
|
||||
import * as grpc from '@grpc/grpc-js'
|
||||
|
||||
import { Character } from './proto/character'
|
||||
import { Character, GetCharacterRequest, GetCharacterResponse } from './proto/character'
|
||||
|
||||
export function initCharacterService(server: grpc.Server) {
|
||||
}
|
||||
|
||||
function getCharacter(request: GetCharacterRequest): GetCharacterResponse {
|
||||
return new GetCharacterResponse()
|
||||
}
|
||||
Reference in New Issue
Block a user