added docker file
This commit is contained in:
parent
8c5fe4266f
commit
a94f4df283
17 changed files with 931 additions and 9 deletions
40
user-db-service/.dockerignore
Normal file
40
user-db-service/.dockerignore
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
# Node.js specific
|
||||
**node_modules/
|
||||
npm-debug.log
|
||||
yarn-debug.log
|
||||
|
||||
# Environment and secrets
|
||||
.env*
|
||||
*.env
|
||||
*.pem
|
||||
*.key
|
||||
*.crt
|
||||
|
||||
# Development artifacts
|
||||
.idea/
|
||||
.vscode/
|
||||
*.swp
|
||||
*.swo
|
||||
dist/
|
||||
build/
|
||||
out/
|
||||
|
||||
# Version control
|
||||
.git/
|
||||
.gitignore
|
||||
|
||||
# Temporary files
|
||||
tmp/
|
||||
temp/
|
||||
*.tmp
|
||||
|
||||
# Documentation
|
||||
*.md
|
||||
README*
|
||||
|
||||
# Docker files
|
||||
Dockerfile*
|
||||
docker-compose*
|
||||
|
||||
# Project-specific
|
||||
package-lock.json
|
||||
17
user-db-service/DockerfileDEV
Normal file
17
user-db-service/DockerfileDEV
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# syntax=docker/dockerfile:1
|
||||
|
||||
# Use the official Node.js image as the base image
|
||||
ARG NODE_VERSION=22.13.1
|
||||
FROM node:${NODE_VERSION}-slim AS base
|
||||
|
||||
# Set the working directory
|
||||
WORKDIR /app
|
||||
|
||||
COPY . .
|
||||
RUN apt-get update -y && apt-get install -y openssl && npm install && npx prisma generate
|
||||
|
||||
# Expose the application port
|
||||
EXPOSE 3100
|
||||
|
||||
# Define the command to run the application
|
||||
CMD ["node", "app.js"]
|
||||
12
user-db-service/dev.env
Normal file
12
user-db-service/dev.env
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# Environment variables declared in this file are automatically made available to Prisma.
|
||||
# See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema
|
||||
|
||||
# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB.
|
||||
# See the documentation for all the connection string options: https://pris.ly/d/connection-strings
|
||||
|
||||
#use this when testing local, remmber to run the proxy command
|
||||
DATABASE_URL="postgresql://postgres:wly9H8gjjmxYfg1@host.docker.internal:15432/postgres?schema=public"
|
||||
|
||||
# DATABASE_URL="postgres://postgres:wly9H8gjjmxYfg1@bytecamp-db.flycast:5432?sslmode=disable"
|
||||
# DATABASE_URL=postgres://snakebyte:zVB7lgOiKr89dq6@localhost:5432/snakebyte?sslmode=disable
|
||||
NODE_PORT=3100
|
||||
Loading…
Add table
Add a link
Reference in a new issue