You've already forked isop-mirror
Compare commits
3 Commits
develop
...
feature/do
| Author | SHA1 | Date | |
|---|---|---|---|
| 187b56b464 | |||
| c99017623b | |||
| b1c26b762a |
9
backend/.dockerignore
Normal file
9
backend/.dockerignore
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
.git
|
||||||
|
.env
|
||||||
|
storage/logs/*
|
||||||
|
storage/framework/cache/*
|
||||||
|
storage/framework/sessions/*
|
||||||
|
storage/framework/views/*
|
||||||
|
bootstrap/cache/*
|
||||||
|
.phpunit.result.cache
|
||||||
|
vendor/*
|
||||||
16
backend/Dockerfile
Normal file
16
backend/Dockerfile
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
FROM dunglas/frankenphp:1.10-php8.4-bookworm
|
||||||
|
|
||||||
|
RUN install-php-extensions \
|
||||||
|
pdo_mysql \
|
||||||
|
gd \
|
||||||
|
intl \
|
||||||
|
zip \
|
||||||
|
opcache
|
||||||
|
|
||||||
|
COPY . /app
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||||
|
|
||||||
|
RUN composer install --no-dev --optimize-autoloader
|
||||||
1
docker/.gitignore
vendored
Normal file
1
docker/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
mariadb_data/
|
||||||
63
docker/docker-compose.yml
Normal file
63
docker/docker-compose.yml
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
services:
|
||||||
|
isop-frontend:
|
||||||
|
container_name: isop-frontend
|
||||||
|
build:
|
||||||
|
context: ../frontend
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
NUXT_HOST: 0.0.0.0
|
||||||
|
NUXT_PORT: 80
|
||||||
|
NUXT_PUBLIC_SANCTUM_BASE_URL: https://localhost
|
||||||
|
NUXT_PUBLIC_SANCTUM_ORIGINAL: http://localhost
|
||||||
|
ports:
|
||||||
|
- 80:80
|
||||||
|
depends_on:
|
||||||
|
- isop-backend
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost"]
|
||||||
|
start_period: 10s
|
||||||
|
interval: 1m
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
|
||||||
|
isop-backend:
|
||||||
|
container_name: isop-backend
|
||||||
|
build:
|
||||||
|
context: ../backend
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
restart: unless-stopped
|
||||||
|
env_file:
|
||||||
|
- ../backend/.env
|
||||||
|
environment:
|
||||||
|
DB_CONNECTION: mariadb
|
||||||
|
DB_HOST: isop-database
|
||||||
|
DB_PORT: 3306
|
||||||
|
DB_DATABASE: isop
|
||||||
|
DB_USERNAME: root
|
||||||
|
DB_PASSWORD: admin
|
||||||
|
ports:
|
||||||
|
- 443:443
|
||||||
|
- 443:443/udp
|
||||||
|
depends_on:
|
||||||
|
isop-database:
|
||||||
|
condition: service_healthy
|
||||||
|
|
||||||
|
isop-database:
|
||||||
|
container_name: isop-database
|
||||||
|
image: mariadb:11.8.2-noble
|
||||||
|
restart: unless-stopped
|
||||||
|
cap_add:
|
||||||
|
# Allow memory binding
|
||||||
|
- SYS_NICE
|
||||||
|
environment:
|
||||||
|
MARIADB_DATABASE: "isop"
|
||||||
|
MARIADB_ROOT_PASSWORD: "admin"
|
||||||
|
volumes:
|
||||||
|
- ./mariadb_data:/var/lib/mysql
|
||||||
|
healthcheck:
|
||||||
|
test: [ "CMD", "healthcheck.sh", "--su-mysql", "--connect", "--innodb_initialized" ]
|
||||||
|
start_period: 10s
|
||||||
|
interval: 1m
|
||||||
|
timeout: 5s
|
||||||
|
retries: 3
|
||||||
8
frontend/.dockerignore
Normal file
8
frontend/.dockerignore
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
.nuxt/
|
||||||
|
.output/
|
||||||
|
.env*
|
||||||
|
node_modules/
|
||||||
|
cypress/
|
||||||
|
cypress.config.ts
|
||||||
|
package-lock.json
|
||||||
|
*.md
|
||||||
37
frontend/Dockerfile
Normal file
37
frontend/Dockerfile
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
# Build Stage 1
|
||||||
|
|
||||||
|
FROM node:22-alpine AS build
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN corepack enable
|
||||||
|
|
||||||
|
# Copy package.json and your lockfile
|
||||||
|
COPY package.json ./
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
RUN pnpm i
|
||||||
|
|
||||||
|
# Copy the entire project
|
||||||
|
COPY . ./
|
||||||
|
|
||||||
|
# Prepare Nuxt (generates .nuxt with type definitions and auto-imports)
|
||||||
|
RUN pnpm run postinstall
|
||||||
|
|
||||||
|
# Build the project
|
||||||
|
RUN pnpm run build
|
||||||
|
|
||||||
|
# Build Stage 2
|
||||||
|
|
||||||
|
FROM node:22-alpine
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Only `.output` folder is needed from the build stage
|
||||||
|
COPY --from=build /app/.output/ ./
|
||||||
|
|
||||||
|
# Change the port and host
|
||||||
|
ENV PORT=80
|
||||||
|
ENV HOST=0.0.0.0
|
||||||
|
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
|
CMD ["node", "/app/server/index.mjs"]
|
||||||
Reference in New Issue
Block a user