mirror of
https://github.com/i701/sarlink-portal.git
synced 2025-02-20 20:02:00 +00:00
Refactor Docker setup and add Prisma Studio service
- Introduced a new prisma-studio service in compose.yml for easier database management. - Added a PostgreSQL database service with environment variables for user and database setup. - Removed the outdated node service configuration from .build/dev/compose.yml. - Simplified the node Dockerfile by removing unnecessary shell configuration. - Created a new prisma.Dockerfile for running Prisma Studio. These changes enhance the development environment and streamline database interactions.
This commit is contained in:
parent
e9d81c089a
commit
1d6f4faf7e
@ -1,7 +0,0 @@
|
||||
services:
|
||||
node:
|
||||
build:
|
||||
context: ../../
|
||||
dockerfile: .build/dev/node.Dockerfile
|
||||
hostname: sarlink-portal
|
||||
image: git.shihaam.dev/sarlink/sarlink-portal
|
@ -1,7 +1,5 @@
|
||||
FROM node:18
|
||||
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
||||
CMD npm run dev
|
||||
|
5
.build/dev/prisma.Dockerfile
Normal file
5
.build/dev/prisma.Dockerfile
Normal file
@ -0,0 +1,5 @@
|
||||
FROM node:18
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
||||
CMD npx prisma studio
|
22
compose.yml
22
compose.yml
@ -8,3 +8,25 @@ services:
|
||||
- ./:/var/www/html/
|
||||
ports:
|
||||
- 3000:3000
|
||||
prisma-studio:
|
||||
build:
|
||||
context: .build/dev
|
||||
dockerfile: prisma.Dockerfile
|
||||
hostname: sarlink-portal-studio
|
||||
volumes:
|
||||
- ./:/var/www/html/
|
||||
ports:
|
||||
- 5555:5555
|
||||
database:
|
||||
image: postgres:14
|
||||
hostname: sarlink-portal-db
|
||||
volumes:
|
||||
- db-data:/var/lib/postgresql/data
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: testpass123
|
||||
POSTGRES_DB: mydb
|
||||
|
||||
|
||||
volumes:
|
||||
db-data:
|
||||
|
Loading…
x
Reference in New Issue
Block a user