Skip to content

Commit 1b012eb

Browse files
committed
pre-commit and clean up
1 parent c114736 commit 1b012eb

79 files changed

Lines changed: 104 additions & 101 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/push-image.yaml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,12 @@ jobs:
5555
push: true
5656
tags: ${{ steps.meta.outputs.tags }}
5757
labels: ${{ steps.meta.outputs.labels }}
58-
cache-from: type=gha
59-
cache-to: type=gha,mode=max
60-
platforms: linux/amd64
6158

6259
- name: Image summary
6360
run: |
64-
echo "### Docker Image Built and Pushed :rocket:" >> $GITHUB_STEP_SUMMARY
61+
echo "Image: \`${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}\`" >> $GITHUB_STEP_SUMMARY
6562
echo "" >> $GITHUB_STEP_SUMMARY
66-
echo "**Image**: \`${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}\`" >> $GITHUB_STEP_SUMMARY
67-
echo "" >> $GITHUB_STEP_SUMMARY
68-
echo "**Tags**:" >> $GITHUB_STEP_SUMMARY
63+
echo "Tags:" >> $GITHUB_STEP_SUMMARY
6964
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
7065
echo "${{ steps.meta.outputs.tags }}" >> $GITHUB_STEP_SUMMARY
7166
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY

.pre-commit-config.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,15 @@ repos:
2222
args: [--fix]
2323
# Run the formatter
2424
- id: ruff-format
25+
26+
# Detect secrets
27+
- repo: https://github.com/gitleaks/gitleaks
28+
rev: v8.24.2
29+
hooks:
30+
- id: gitleaks
31+
32+
# Lint Github Actions
33+
- repo: https://github.com/rhysd/actionlint
34+
rev: v1.7.8
35+
hooks:
36+
- id: actionlint

Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ RUN mkdir -p /data/networks && \
5050

5151
USER appuser
5252

53-
ENV DATA_DIR=/data
5453
ENV PATH="/app/.venv/bin:$PATH"
5554

5655
EXPOSE 8000
@@ -65,7 +64,6 @@ WORKDIR /frontend
6564

6665
# Use Docker-compatible build paths
6766
ENV DOCKER_BUILD=true
68-
ENV DATA_DIR=/data
6967

7068
COPY frontend/app/package*.json ./
7169
COPY frontend/app/ ./
@@ -82,7 +80,6 @@ WORKDIR /map
8280

8381
# Use Docker-compatible build paths
8482
ENV DOCKER_BUILD=true
85-
ENV DATA_DIR=/data
8683

8784
COPY frontend/map/package*.json ./
8885
COPY frontend/map/ ./

compose/.env.example

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@
66

77
APP_PORT=8000
88

9-
# Map Configuration (Optional)
10-
# -----------------------------
11-
12-
# To use the interactive Network map, a mapbox token is needed
13-
VITE_MAPBOX_TOKEN=your_mapbox_token_here
14-
159
# Database Configuration
1610
# ----------------------
1711

@@ -21,6 +15,12 @@ POSTGRES_USER=pypsa_app
2115
POSTGRES_PASSWORD=changeme
2216
POSTGRES_PORT=5432
2317

18+
# Map Configuration (Optional)
19+
# -----------------------------
20+
21+
# To use the interactive Network map, a mapbox token is needed
22+
VITE_MAPBOX_TOKEN=your_mapbox_token_here
23+
2424
# Authentication Configuration (Optional)
2525
# ---------------------------------------
2626

compose/compose.full.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ services:
5353
- SESSION_TTL=${SESSION_TTL:-604800}
5454
- BASE_URL=${BASE_URL}
5555
volumes:
56-
- ../data:/data
56+
- ../data:/app/data
5757
depends_on:
5858
postgres:
5959
condition: service_healthy
@@ -77,7 +77,7 @@ services:
7777
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST:-postgres}:${POSTGRES_PORT:-5432}/${POSTGRES_DB}
7878
- REDIS_URL=redis://redis:6379/0
7979
volumes:
80-
- ../data:/data
80+
- ../data:/app/data
8181
depends_on:
8282
postgres:
8383
condition: service_healthy

compose/compose.minimal.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ services:
88
ports:
99
- 8000:8000
1010
volumes:
11-
- ../data:/data
11+
- ../data:/app/data
1212
restart: unless-stopped
Lines changed: 1 addition & 1 deletion

frontend/app/src/lib/components/ui/avatar/avatar-fallback.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
data-slot="avatar-fallback"
1515
class={cn("bg-muted flex size-full items-center justify-center rounded-full", className)}
1616
{...restProps}
17-
/>
17+
/>

frontend/app/src/lib/components/ui/avatar/avatar-image.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
data-slot="avatar-image"
1515
class={cn("aspect-square size-full", className)}
1616
{...restProps}
17-
/>
17+
/>

frontend/app/src/lib/components/ui/avatar/avatar.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
data-slot="avatar"
1717
class={cn("relative flex size-8 shrink-0 overflow-hidden rounded-full", className)}
1818
{...restProps}
19-
/>
19+
/>

0 commit comments

Comments
 (0)