Compare commits

..

4 Commits

Author SHA1 Message Date
87fbf98858 Merge pull request 'deploy sh2' (#6) from develop into test
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #6
2026-03-27 14:37:50 +03:00
a24c2f18d8 Merge pull request 'develop' (#4) from develop into test
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
Reviewed-on: #4
2026-03-27 14:25:43 +03:00
49f9f69b1e Merge pull request 'deploy sh1' (#3) from develop into test
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #3
2026-03-27 14:13:08 +03:00
c7e251cc1c Merge pull request 'develop' (#2) from develop into test
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
Reviewed-on: #2
2026-03-27 13:39:44 +03:00
5 changed files with 18 additions and 12 deletions

View File

@@ -3,13 +3,27 @@ type: docker
name: bogazici-api
trigger:
event:
- push
branch:
- develop
- test
- main
steps:
- name: laravel-check
image: php:8.4-cli
when:
branch:
- develop
commands:
- apt-get update && apt-get install -y git unzip curl libzip-dev libicu-dev default-mysql-client
- docker-php-ext-install pdo_mysql zip intl
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- cp .env.example .env || true
- composer install --no-interaction --prefer-dist --optimize-autoloader
- php artisan key:generate --force || true
- php artisan optimize:clear || true
- php artisan test || true
- name: deploy-test
image: appleboy/drone-ssh
when:

View File

@@ -1,10 +1,9 @@
name: bogazici-api-prod
services:
bdc-api-prod:
build:
context: .
dockerfile: Dockerfile
container_name: bdc-api-prod
restart: unless-stopped
volumes:
- ./:/var/www/html

View File

@@ -5,6 +5,7 @@ services:
build:
context: .
dockerfile: Dockerfile
container_name: bdc-api-test
restart: unless-stopped
volumes:
- ./:/var/www/html

View File

@@ -37,13 +37,9 @@ if ! grep -q '^APP_KEY=base64:' .env; then
exit 1
fi
mkdir -p "$UPLOADS_DIR"
chmod 2775 "$UPLOADS_DIR" 2>/dev/null || true
docker rm -f bogazici-api-prod-bdc-api-prod-1 2>/dev/null || true
docker rm -f bdc-api-prod 2>/dev/null || true
docker compose -p "$COMPOSE_PROJECT" -f "$COMPOSE_FILE" down --remove-orphans || true
docker compose -p "$COMPOSE_PROJECT" -f "$COMPOSE_FILE" up -d --build

View File

@@ -40,13 +40,9 @@ fi
mkdir -p "$UPLOADS_DIR"
chmod 2775 "$UPLOADS_DIR" 2>/dev/null || true
docker rm -f bogazici-api-test-bdc-api-test-1 2>/dev/null || true
docker rm -f bdc-api-test 2>/dev/null || true
docker compose -p "$COMPOSE_PROJECT" -f "$COMPOSE_FILE" down --remove-orphans || true
docker compose -p "$COMPOSE_PROJECT" -f "$COMPOSE_FILE" up -d --build
echo "⏳ Container hazır olması bekleniyor..."
for i in {1..30}; do
if docker compose -p "$COMPOSE_PROJECT" -f "$COMPOSE_FILE" ps --status running | grep -q "$CONTAINER"; then