mirror of
https://github.com/blackboxprogramming/blackroad-apps.git
synced 2026-03-17 04:57:16 -05:00
feat: prepare all services for production deployment
Co-authored-by: blackboxprogramming <118287761+blackboxprogramming@users.noreply.github.com>
This commit is contained in:
8
roadview/.dockerignore
Normal file
8
roadview/.dockerignore
Normal file
@@ -0,0 +1,8 @@
|
||||
node_modules
|
||||
.env
|
||||
*.log
|
||||
npm-debug.log*
|
||||
.DS_Store
|
||||
.git
|
||||
.gitignore
|
||||
README.md
|
||||
3
roadview/.env.example
Normal file
3
roadview/.env.example
Normal file
@@ -0,0 +1,3 @@
|
||||
# Server
|
||||
PORT=3000
|
||||
NODE_ENV=production
|
||||
10
roadview/Dockerfile
Normal file
10
roadview/Dockerfile
Normal file
@@ -0,0 +1,10 @@
|
||||
FROM node:20-alpine
|
||||
WORKDIR /app
|
||||
RUN addgroup --system --gid 1001 nodejs && adduser --system --uid 1001 appuser
|
||||
COPY package.json package-lock.json* ./
|
||||
RUN npm ci --omit=dev
|
||||
COPY --chown=appuser:nodejs . .
|
||||
USER appuser
|
||||
EXPOSE 3000
|
||||
ENV NODE_ENV=production
|
||||
CMD ["node", "server.js"]
|
||||
@@ -8,6 +8,10 @@ app.get('/health', (req, res) => {
|
||||
res.json({ status: 'healthy', service: 'RoadView', version: '1.0.0' });
|
||||
});
|
||||
|
||||
app.get('/api/health', (req, res) => {
|
||||
res.json({ status: 'healthy', service: 'RoadView', version: '1.0.0' });
|
||||
});
|
||||
|
||||
app.get('/', (req, res) => {
|
||||
res.json({
|
||||
name: 'RoadView',
|
||||
|
||||
Reference in New Issue
Block a user