update compose for monorepo
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 5s
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 5s
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
FROM node:18
|
FROM node:22-slim
|
||||||
|
|
||||||
WORKDIR /var/www/html
|
WORKDIR /var/www/html
|
||||||
|
|
||||||
CMD npm run dev
|
# Source is bind-mounted at runtime; install on start so package.json changes
|
||||||
|
# are picked up without a rebuild, then run the Next.js dev server.
|
||||||
|
CMD npm install --legacy-peer-deps && npm run dev -- -H 0.0.0.0
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
FROM node:18
|
|
||||||
|
|
||||||
WORKDIR /var/www/html
|
|
||||||
|
|
||||||
CMD npx prisma studio
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
### Docker/Podman compose.yml
|
|
||||||
```yml
|
|
||||||
services:
|
|
||||||
sarlinkportal:
|
|
||||||
image: git.shihaam.dev/sarlink/sarlink-portal
|
|
||||||
hostname: sarlink-portal
|
|
||||||
ports:
|
|
||||||
- 3000:3000
|
|
||||||
# volumes:
|
|
||||||
# - uploads:/var/www/html/public/uploads
|
|
||||||
env_file: .env
|
|
||||||
```
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
FROM node:20-slim AS builder
|
|
||||||
WORKDIR /var/www/html
|
|
||||||
ENV NEXT_TELEMETRY_DISABLED=1
|
|
||||||
|
|
||||||
COPY . .
|
|
||||||
RUN npm ci --legacy-peer-deps
|
|
||||||
RUN npm run build
|
|
||||||
|
|
||||||
FROM node:20-slim
|
|
||||||
WORKDIR /var/www/html
|
|
||||||
|
|
||||||
RUN apt update && apt install openssl -y
|
|
||||||
|
|
||||||
COPY --from=builder /var/www/html/package.json ./
|
|
||||||
COPY --from=builder /var/www/html/node_modules ./node_modules
|
|
||||||
COPY --from=builder /var/www/html/.next ./.next
|
|
||||||
COPY --from=builder /var/www/html/public ./public
|
|
||||||
|
|
||||||
VOLUME /var/www/html
|
|
||||||
|
|
||||||
ENV HOSTNAME "0.0.0.0"
|
|
||||||
|
|
||||||
CMD ["npm", "start"]
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
services:
|
|
||||||
app:
|
|
||||||
build:
|
|
||||||
context: ../../
|
|
||||||
dockerfile: .build/prod/bun.Dockerfile
|
|
||||||
hostname: sarlink-portal
|
|
||||||
image: git.shihaam.dev/sarlink/sarlink-portal
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
FROM oven/bun:1.1.42-debian
|
|
||||||
|
|
||||||
WORKDIR /var/www/html
|
|
||||||
|
|
||||||
RUN apt update && apt install openssl -y
|
|
||||||
|
|
||||||
CMD bunx prisma studio
|
|
||||||
+11
-31
@@ -1,32 +1,12 @@
|
|||||||
services:
|
services:
|
||||||
node:
|
frontend:
|
||||||
build:
|
build:
|
||||||
context: .build/dev
|
context: .build/dev
|
||||||
dockerfile: node.Dockerfile
|
dockerfile: node.Dockerfile
|
||||||
hostname: sarlink-portal-dev
|
hostname: frontend
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/var/www/html/
|
- ./:/var/www/html/
|
||||||
ports:
|
ports:
|
||||||
- 3000:3000
|
- 3000:3000
|
||||||
prisma-studio:
|
env_file:
|
||||||
build:
|
- .env
|
||||||
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:
|
|
||||||
|
|||||||
Generated
+13970
-13987
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user