first commit

This commit is contained in:
2026-01-17 15:27:46 -05:00
commit 713f205255
6 changed files with 127 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
{
"permissions": {
"allow": [
"Bash(ls:*)",
"Bash(docker compose:*)"
]
}
}

1
README.md Normal file
View File

@@ -0,0 +1 @@
# Deploy

20
build_and_push.sh Normal file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
# Set the name of the Docker Compose file
COMPOSE_FILE="docker-compose.build.yml"
# Build the images using docker-compose
echo "Building Docker images..."
docker-compose -f $COMPOSE_FILE build
# Check if the build was successful
if [ $? -eq 0 ]; then
echo "Build successful. Pushing images to Docker registry..."
# Push the images to the registry
docker-compose -f $COMPOSE_FILE push
else
echo "Build failed. Aborting push to registry."
exit 1
fi
echo "Images have been built and pushed to the Docker registry."

39
docker-compose.dev.yml Executable file
View File

@@ -0,0 +1,39 @@
name: customer_gateway
services:
api_dev:
restart: always
tty: true
stdin_open: true
build:
context: ../api
dockerfile: Dockerfile.dev
volumes:
- ../api:/app
- images:/images
ports:
- '8000:8000'
env_file:
- ../api/.env.dev
environment:
- MODE=DEVELOPMENT
command: 'uvicorn main:app --reload --host 0.0.0.0 --port 8000'
frontend_dev:
restart: on-failure
tty: true
stdin_open: true
build:
context: ../frontend
dockerfile: Dockerfile.dev
volumes:
- ../frontend:/app
ports:
- '5173:5173'
command: 'vite dev --host --port 5173'
volumes:
images:

30
docker-compose.local.yml Normal file
View File

@@ -0,0 +1,30 @@
name: customer_gateway
services:
api_local:
restart: always
build:
context: ../api
dockerfile: Dockerfile.local
volumes:
- images:/images
ports:
- '8000:8000'
env_file:
- ../api/.env.local
environment:
- MODE=LOCAL
command: 'uvicorn main:app --reload --host 0.0.0.0 --port 8000'
frontend_local:
restart: on-failure
build:
context: ../frontend
dockerfile: Dockerfile.local
ports:
- '80:80'
volumes:
images:

29
docker-compose.prod.yml Normal file
View File

@@ -0,0 +1,29 @@
name: customer_gateway
services:
api_prod:
restart: always
build:
context: ../api
dockerfile: Dockerfile.prod
volumes:
- images:/images
ports:
- '8000:80'
env_file:
- ../api/.env.prod
environment:
- MODE=PRODUCTION
frontend_prod:
restart: on-failure
build:
context: ../frontend
dockerfile: Dockerfile.prod
ports:
- '3000:80'
volumes:
images: