Compare commits
No commits in common. "3e4224b1bff9aa98db5f6e0bea60ab023dc68d74" and "1dde4ddb576f1de0127e65492e74db88cb701faa" have entirely different histories.
3e4224b1bf
...
1dde4ddb57
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
description:
|
||||||
|
globs:
|
||||||
|
alwaysApply: false
|
||||||
|
---
|
|
@ -3,36 +3,3 @@ description:
|
||||||
globs:
|
globs:
|
||||||
alwaysApply: false
|
alwaysApply: false
|
||||||
---
|
---
|
||||||
# Gitignore Rules
|
|
||||||
|
|
||||||
The [.gitignore](mdc:.gitignore) file controls which files are tracked by Git.
|
|
||||||
|
|
||||||
## Key Patterns
|
|
||||||
|
|
||||||
- Cruft files (temporary/generated files) should always be ignored
|
|
||||||
- The `./temp` directory should exist in the repository
|
|
||||||
- Contents of `./temp` should be ignored (except for `.gitkeep`)
|
|
||||||
|
|
||||||
## Standard Cruft Files to Ignore
|
|
||||||
|
|
||||||
- `*.log` - Log files
|
|
||||||
- `*.tmp`, `*.bak` - Temporary and backup files
|
|
||||||
- `*.swp`, `*.swo` - Vim swap files
|
|
||||||
- `*.pyc`, `__pycache__/` - Python bytecode
|
|
||||||
- `node_modules/` - Node.js dependencies
|
|
||||||
- `dist/`, `build/` - Build output directories
|
|
||||||
- `*.DS_Store`, `Thumbs.db` - OS-specific files
|
|
||||||
|
|
||||||
## Temp Directory Setup
|
|
||||||
|
|
||||||
```gitignore
|
|
||||||
# Allow temp directory but ignore its contents
|
|
||||||
./temp/*
|
|
||||||
!./temp/.gitkeep
|
|
||||||
```
|
|
||||||
|
|
||||||
## Important Guidelines
|
|
||||||
|
|
||||||
- When adding files to a previously empty directory with a `.gitkeep`, remove the `.gitkeep` file
|
|
||||||
- Never commit sensitive data, temporary build artifacts, or large binary files
|
|
||||||
- Keep the temp directory clean by only using it for local testing
|
|
||||||
|
|
|
@ -1,47 +0,0 @@
|
||||||
---
|
|
||||||
description:
|
|
||||||
globs:
|
|
||||||
alwaysApply: false
|
|
||||||
---
|
|
||||||
# .gitkeep File Handling
|
|
||||||
|
|
||||||
## Purpose of .gitkeep
|
|
||||||
|
|
||||||
The `.gitkeep` file is a convention (not a Git feature) used to:
|
|
||||||
- Track otherwise empty directories in Git
|
|
||||||
- Ensure important directory structures are maintained
|
|
||||||
- Placeholder for directories that will contain files in the future
|
|
||||||
|
|
||||||
## Important Rule
|
|
||||||
|
|
||||||
**When adding content to a directory that contains a `.gitkeep` file, you should delete the `.gitkeep` file.**
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Example workflow when adding content to a previously empty directory
|
|
||||||
# 1. Check if .gitkeep exists
|
|
||||||
if [ -f directory/.gitkeep ]; then
|
|
||||||
# 2. Remove it when adding actual content
|
|
||||||
rm directory/.gitkeep
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 3. Add your files
|
|
||||||
touch directory/your-new-file.txt
|
|
||||||
|
|
||||||
# 4. Commit both changes together
|
|
||||||
git add directory/
|
|
||||||
git commit -m "Add content to directory and remove .gitkeep"
|
|
||||||
```
|
|
||||||
|
|
||||||
## Why Remove .gitkeep?
|
|
||||||
|
|
||||||
- `.gitkeep` serves no purpose once a directory contains files
|
|
||||||
- Leaving it creates confusion about the directory's status
|
|
||||||
- Proper cleanup maintains a clean repository
|
|
||||||
|
|
||||||
## Locations with .gitkeep
|
|
||||||
|
|
||||||
In this project, the following locations may contain `.gitkeep` files:
|
|
||||||
- [temp/.gitkeep](mdc:temp/.gitkeep) - Keeps the temp directory in the repo
|
|
||||||
- [docker/template/src/.gitkeep](mdc:docker/template/src/.gitkeep) - Keeps the source directory in the repo
|
|
||||||
|
|
||||||
Always check for `.gitkeep` when adding files to these directories and remove it if found.
|
|
|
@ -5,9 +5,22 @@ services:
|
||||||
context: ./docker/template
|
context: ./docker/template
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
image: template:dev
|
image: template:dev
|
||||||
|
ports:
|
||||||
|
- "3000:3000"
|
||||||
volumes:
|
volumes:
|
||||||
- ./docker/template/src:/scratch
|
- ./docker/template/src:/app/src
|
||||||
- ./temp:/temp
|
- ./temp:/app/temp
|
||||||
|
environment:
|
||||||
|
- NODE_ENV=development
|
||||||
|
- DEBUG=true
|
||||||
|
- LOG_LEVEL=debug
|
||||||
|
restart: unless-stopped
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 3
|
||||||
|
start_period: 10s
|
||||||
networks:
|
networks:
|
||||||
- dev_network
|
- dev_network
|
||||||
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
# Test configuration
|
|
||||||
services:
|
|
||||||
template:
|
|
||||||
build:
|
|
||||||
context: ./docker/template
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
image: template:test
|
|
||||||
volumes:
|
|
||||||
- ./docker/template/src:/scratch
|
|
||||||
- ./temp:/temp
|
|
||||||
# Since scratch can't run commands, we use a dummy entrypoint
|
|
||||||
entrypoint: "true"
|
|
|
@ -1,10 +0,0 @@
|
||||||
FROM alpine:3.18
|
|
||||||
|
|
||||||
# Create directories for volume mounts
|
|
||||||
RUN mkdir -p /scratch /temp
|
|
||||||
|
|
||||||
# Set working directory
|
|
||||||
WORKDIR /scratch
|
|
||||||
|
|
||||||
# Simple command to keep container running
|
|
||||||
CMD ["tail", "-f", "/dev/null"]
|
|
|
@ -1 +0,0 @@
|
||||||
FROM git.nixc.us/nixius/template:staging
|
|
|
@ -1,32 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Create temp directory if it doesn't exist
|
|
||||||
mkdir -p ./temp
|
|
||||||
|
|
||||||
# Run tests and capture output
|
|
||||||
echo "Running tests..."
|
|
||||||
echo "Test started at $(date)" > ./temp/test_output.log
|
|
||||||
|
|
||||||
# Example test commands
|
|
||||||
echo "Testing Docker build..." >> ./temp/test_output.log
|
|
||||||
docker compose -f docker-compose.test.yml build >> ./temp/test_output.log 2>&1
|
|
||||||
|
|
||||||
echo "Testing container startup..." >> ./temp/test_output.log
|
|
||||||
docker compose -f docker-compose.test.yml up -d >> ./temp/test_output.log 2>&1
|
|
||||||
|
|
||||||
# Wait for container to be ready
|
|
||||||
sleep 5
|
|
||||||
|
|
||||||
# Check container status
|
|
||||||
echo "Container status:" >> ./temp/test_output.log
|
|
||||||
docker compose -f docker-compose.test.yml ps >> ./temp/test_output.log 2>&1
|
|
||||||
|
|
||||||
# Clean up
|
|
||||||
echo "Cleaning up..." >> ./temp/test_output.log
|
|
||||||
docker compose -f docker-compose.test.yml down >> ./temp/test_output.log 2>&1
|
|
||||||
|
|
||||||
echo "Tests completed at $(date)" >> ./temp/test_output.log
|
|
||||||
|
|
||||||
# Display results
|
|
||||||
echo "Test results have been saved to ./temp/test_output.log"
|
|
||||||
cat ./temp/test_output.log
|
|
Loading…
Reference in New Issue