Added base project
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
FROM dunglas/frankenphp:1.10.1-php8.3
|
||||
|
||||
RUN install-php-extensions \
|
||||
pdo_mysql \
|
||||
gd \
|
||||
intl \
|
||||
zip \
|
||||
opcache
|
||||
|
||||
COPY deployment/Caddyfile /etc/frankenphp/Caddyfile
|
||||
|
||||
COPY . /app
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
||||
|
||||
RUN composer install
|
||||
|
||||
RUN chown -R www-data:www-data /app \
|
||||
&& chmod -R 755 /app/storage
|
||||
@@ -0,0 +1,13 @@
|
||||
FROM oven/bun:1 AS build-stage
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json ./
|
||||
RUN bun install
|
||||
|
||||
COPY . .
|
||||
RUN bun run build
|
||||
|
||||
FROM nginx:alpine
|
||||
COPY --from=build-stage /app/dist /usr/share/nginx/html
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
EXPOSE 80
|
||||
@@ -0,0 +1,12 @@
|
||||
FROM oven/bun:1
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json ./
|
||||
RUN bun install
|
||||
|
||||
COPY . .
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
ENV APP_PORT=8080
|
||||
CMD ["bun", "start"]
|
||||
@@ -0,0 +1,45 @@
|
||||
# mysql-deployment.yaml
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: mysql
|
||||
namespace: dad-group-x
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: mysql
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: mysql
|
||||
spec:
|
||||
priorityClassName: high-priority
|
||||
containers:
|
||||
- name: mysql
|
||||
image: mysql:8.0
|
||||
env:
|
||||
- name: MYSQL_ALLOW_EMPTY_PASSWORD
|
||||
value: "yes"
|
||||
- name: MYSQL_DATABASE
|
||||
value: "project"
|
||||
ports:
|
||||
- containerPort: 3306
|
||||
resources:
|
||||
requests:
|
||||
memory: "384Mi"
|
||||
cpu: "200m"
|
||||
limits:
|
||||
memory: "1Gi"
|
||||
cpu: "500m"
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: mysql
|
||||
namespace: dad-group-x
|
||||
spec:
|
||||
ports:
|
||||
- port: 3306
|
||||
selector:
|
||||
app: mysql
|
||||
@@ -0,0 +1,38 @@
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: app-ingress
|
||||
namespace: dad-group-x
|
||||
spec:
|
||||
rules:
|
||||
- host: web-dad-group-x-172.22.21.253.sslip.io
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: vue-app
|
||||
port:
|
||||
number: 80
|
||||
- host: api-dad-group-x-172.22.21.253.sslip.io
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: laravel-app
|
||||
port:
|
||||
number: 80
|
||||
- host: ws-dad-group-x-172.22.21.253.sslip.io
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: websocket-server
|
||||
port:
|
||||
number: 3000
|
||||
@@ -0,0 +1,39 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: laravel-app
|
||||
namespace: dad-group-x
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: laravel-app
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: laravel-app
|
||||
spec:
|
||||
priorityClassName: high-priority
|
||||
containers:
|
||||
- name: api
|
||||
image: registry-172.22.21.115.sslip.io/dad-group-x/api:v1.0.0
|
||||
resources:
|
||||
requests:
|
||||
memory: "256Mi"
|
||||
cpu: "100m"
|
||||
limits:
|
||||
memory: "512Mi"
|
||||
cpu: "300m"
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: laravel-app
|
||||
namespace: dad-group-x
|
||||
spec:
|
||||
ports:
|
||||
- port: 80
|
||||
selector:
|
||||
app: laravel-app
|
||||
@@ -0,0 +1,39 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: vue-app
|
||||
namespace: dad-group-x
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: vue-app
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: vue-app
|
||||
spec:
|
||||
priorityClassName: low-priority
|
||||
containers:
|
||||
- name: web
|
||||
image: registry-172.22.21.115.sslip.io/dad-group-x/web:v1.0.0
|
||||
resources:
|
||||
requests:
|
||||
memory: "64Mi"
|
||||
cpu: "50m"
|
||||
limits:
|
||||
memory: "128Mi"
|
||||
cpu: "100m"
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: vue-app
|
||||
namespace: dad-group-x
|
||||
spec:
|
||||
ports:
|
||||
- port: 80
|
||||
selector:
|
||||
app: vue-app
|
||||
@@ -0,0 +1,39 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: websocket-server
|
||||
namespace: dad-group-x
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: websocket-server
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: websocket-server
|
||||
spec:
|
||||
priorityClassName: low-priority
|
||||
containers:
|
||||
- name: web
|
||||
image: registry-172.22.21.115.sslip.io/dad-group-x/ws:v1.0.0
|
||||
resources:
|
||||
requests:
|
||||
memory: "128Mi"
|
||||
cpu: "50m"
|
||||
limits:
|
||||
memory: "256Mi"
|
||||
cpu: "200m"
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: websocket-server
|
||||
namespace: dad-group-x
|
||||
spec:
|
||||
ports:
|
||||
- port: 3000
|
||||
selector:
|
||||
app: websocket-server
|
||||
Reference in New Issue
Block a user