Skip to content

Commit

Permalink
Refatoração de código e docker
Browse files Browse the repository at this point in the history
  • Loading branch information
mundotv789123 committed Dec 24, 2024
1 parent 38559e3 commit ec672a5
Show file tree
Hide file tree
Showing 32 changed files with 5,872 additions and 534 deletions.
15 changes: 0 additions & 15 deletions .babelrc

This file was deleted.

3 changes: 0 additions & 3 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ jobs:
with:
context: .
push: true
tags: mundotv789123/raspadmin:front
tags: mundotv789123/raspadmin
platforms: linux/amd64,linux/arm64
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,3 @@ yarn-error.log*

# vercel
.vercel

# packages
yarn.lock
package-lock.json
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM nginx
RUN mkdir -p /var/www
COPY ./out /var/www/html
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
FROM mundotv789123/raspadmin:java

ENV spring_web_resources_static-locations='file:/app/front'

COPY ./out /app/front
14 changes: 7 additions & 7 deletions Dockerfile.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM node:18 AS build

WORKDIR /app
COPY . .
RUN cp .env.example .env
RUN npm install
RUN npm run build
FROM node:20
WORKDIR /app
COPY . .
RUN cp .env.example .env
RUN npm install
RUN npm run build
32 changes: 25 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,29 @@
version: '3.1'
services:
frontend:
image: 'mundotv789123/raspadmin:front'
ports:
- '8080:80'
database:
image: 'mariadb:11'
environment:
- MARIADB_DATABASE=raspadmin
- MARIADB_ROOT_PASSWORD=secret
volumes:
- './mysql:/var/lib/mysql'

app:
image: 'mundotv789123/raspadmin'
environment:
- 'FILES_PATH=/app/files'
- 'MEDIA_THUMB=true'

backend:
image: 'mundotv789123/raspadmin:java'
- 'AUTH_ENABLED=false'
- 'USERNAME=admin'
- 'PASSWORD=admin'

- 'DB_TYPE=mysql'
- 'MYSQL_HOST=database'
- 'MYSQL_DB=raspadmin'
- 'MYSQL_USER=root'
- 'MYSQL_PASSWORD=secret'
volumes:
- './data:/app/data'
- './files:/app/files'
ports:
- '8080:8080'
16 changes: 16 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { dirname } from "path";
import { fileURLToPath } from "url";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

const compat = new FlatCompat({
baseDirectory: __dirname,
});

const eslintConfig = [
...compat.extends("next/core-web-vitals", "next/typescript"),
];

export default eslintConfig;
2 changes: 1 addition & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/pages/api-reference/config/typescript for more information.
7 changes: 0 additions & 7 deletions next.config.js

This file was deleted.

14 changes: 14 additions & 0 deletions next.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import type { NextConfig } from "next";

const nextConfig: NextConfig = {
output: 'export',
reactStrictMode: true,
compiler: {
styledComponents: {
ssr: true,
displayName: true,
},
}
};

export default nextConfig;
8 changes: 0 additions & 8 deletions nginx.conf

This file was deleted.

Loading

0 comments on commit ec672a5

Please sign in to comment.