refactor: clean up import statements and update docker-compose configuration

This commit is contained in:
2025-10-17 22:46:08 +02:00
parent 337b07f3c5
commit c266a6d6ac
10 changed files with 1299 additions and 440 deletions

View File

@@ -5,17 +5,17 @@
version: 2
updates:
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/.github/workflow" # Location of package manifests
- package-ecosystem: 'github-actions' # See documentation for possible values
directory: '/.github/workflow' # Location of package manifests
schedule:
interval: "weekly"
interval: 'weekly'
- package-ecosystem: "npm"
directory: "/" # Location of package manifests
- package-ecosystem: 'npm'
directory: '/' # Location of package manifests
schedule:
interval: "weekly"
interval: 'weekly'
- package-ecosystem: "docker"
directory: "/" # Location of Dockerfile
- package-ecosystem: 'docker'
directory: '/' # Location of Dockerfile
schedule:
interval: "weekly"
interval: 'weekly'

View File

@@ -2,7 +2,7 @@ name: Build and Push Docker Image
on:
push:
branches: [ main ]
branches: [main]
jobs:
build-and-push:
@@ -40,4 +40,4 @@ jobs:
ghcr.io/${{ steps.prep.outputs.owner }}/site-comptage-heure:latest
ghcr.io/${{ steps.prep.outputs.owner }}/site-comptage-heure:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
cache-to: type=gha,mode=max

View File

@@ -131,25 +131,18 @@ Ouvrir [http://localhost:3000](http://localhost:3000)
### Avec Docker
1. Build l'image :
1Run le container :
```bash
docker build -t comptage-heures .
docker compose up -d
```
2. Run le container :
```bash
docker run -p 3000:3000 comptage-heures
```
3. Créer un Super Administrateur à l'intérieur du container :
Créer un Super Administrateur à l'intérieur du container :
```bash
docker exec -it <container_id> sh
```
Puis exécuter (pensez à modifier le nom d'utilisateur et le mot de passe si nécessaire) :
```bash
node scripts/create-super-admin.js
```
Puis exécuter (pensez à modifier le nom d'utilisateur et le mot de passe si nécessaire) :
```bash
node scripts/create-super-admin.js
```
## Contribution

View File

@@ -14,7 +14,12 @@ import {
TableHeader,
TableRow,
} from '../../components/ui/table';
import { Card, CardContent, CardHeader, CardTitle } from '../../components/ui/card';
import {
Card,
CardContent,
CardHeader,
CardTitle,
} from '../../components/ui/card';
import {
Dialog,
DialogContent,

View File

@@ -1,5 +1,5 @@
import NextAuth from 'next-auth';
import { authOptions } from '../../../../lib/auth'
import { authOptions } from '../../../../lib/auth';
const handler = NextAuth(authOptions);

View File

@@ -14,7 +14,12 @@ import {
TableHeader,
TableRow,
} from '../../components/ui/table';
import { Card, CardContent, CardHeader, CardTitle } from '../../components/ui/card';
import {
Card,
CardContent,
CardHeader,
CardTitle,
} from '../../components/ui/card';
interface Hour {
id: number;

View File

@@ -6,7 +6,12 @@ import { useRouter } from 'next/navigation';
import { Button } from '../../components/ui/button';
import { Input } from '../../components/ui/input';
import { Label } from '../../components/ui/label';
import { Card, CardContent, CardHeader, CardTitle } from '../../components/ui/card';
import {
Card,
CardContent,
CardHeader,
CardTitle,
} from '../../components/ui/card';
export default function LoginPage() {
const [email, setEmail] = useState('');

View File

@@ -7,11 +7,7 @@ import { Calendar as CalendarIcon } from 'lucide-react';
import { cn } from '../../lib/utils';
import { Button } from './button';
import { Calendar } from './calendar';
import {
Popover,
PopoverContent,
PopoverTrigger,
} from './popover';
import { Popover, PopoverContent, PopoverTrigger } from './popover';
interface DatePickerProps {
date: Date | undefined;

View File

@@ -1,10 +1,9 @@
services:
app:
build: .
image: ghcr.io/breizhhardware/site-comptage-heure:latest
ports:
- '3000:3000'
volumes:
- ./data:/app/prisma/data
environment:
- NEXTAUTH_SECRET=your_secret_key

1664
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff