mirror of
https://github.com/cupcakearmy/coolify.git
synced 2024-10-22 16:14:22 +02:00
Prepare GH Action and Pest
This commit is contained in:
parent
0b248e9be4
commit
845ca5c6b3
27
.github/workflows/docker-image.yml
vendored
27
.github/workflows/docker-image.yml
vendored
@ -13,17 +13,16 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Build the Docker image
|
- name: Build the Docker image
|
||||||
run: |
|
run: |
|
||||||
docker run --rm -u "$(id -u):$(id -g)" \
|
cp .env.example .env
|
||||||
-v "$(pwd):/app" \
|
docker run --rm -u "$(id -u):$(id -g)" \
|
||||||
-w /app composer:2 \
|
-v "$(pwd):/app" \
|
||||||
composer install --ignore-platform-reqs
|
-w /app composer:2 \
|
||||||
TAG=$(date +%s) ./vendor/bin/sail build
|
composer install --ignore-platform-reqs
|
||||||
TAG=$(date +%s) ./vendor/bin/sail up -d
|
./vendor/bin/sail build
|
||||||
sleep 1
|
./vendor/bin/sail up -d
|
||||||
./vendor/bin/sail ps
|
./vendor/bin/sail artisan key:generate
|
||||||
# Now to create .env
|
./vendor/bin/sail artisan migrate:fresh --seed
|
||||||
# Await database is created
|
./vendor/bin/pest
|
||||||
# pest
|
|
||||||
|
@ -1,4 +1,16 @@
|
|||||||
version: '3.8'
|
version: '3.8'
|
||||||
|
|
||||||
|
x-testing-host: &testing-host-base
|
||||||
|
image: coolify-testing-host
|
||||||
|
build:
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
context: ./docker/testing-host
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
- ./docker/testing-host/supervisord.conf:/etc/supervisor/conf.d/supervisord.conf
|
||||||
|
networks:
|
||||||
|
- coolify
|
||||||
|
|
||||||
services:
|
services:
|
||||||
php:
|
php:
|
||||||
image: "coolify:${TAG:-4}"
|
image: "coolify:${TAG:-4}"
|
||||||
@ -19,6 +31,9 @@ services:
|
|||||||
- .:/var/www/html
|
- .:/var/www/html
|
||||||
networks:
|
networks:
|
||||||
- coolify
|
- coolify
|
||||||
|
depends_on:
|
||||||
|
postgres:
|
||||||
|
condition: service_healthy
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:15-alpine
|
image: postgres:15-alpine
|
||||||
ports:
|
ports:
|
||||||
@ -36,34 +51,18 @@ services:
|
|||||||
test:
|
test:
|
||||||
[
|
[
|
||||||
"CMD-SHELL",
|
"CMD-SHELL",
|
||||||
"pg_isready -U $$DB_USERNAME",
|
"pg_isready -U coolify",
|
||||||
"-d",
|
"-d",
|
||||||
"db_prod"
|
"coolify"
|
||||||
]
|
]
|
||||||
retries: 3
|
retries: 5
|
||||||
timeout: 5s
|
timeout: 10s
|
||||||
testing-host:
|
testing-host:
|
||||||
|
<<: *testing-host-base
|
||||||
container_name: coolify-testing-host
|
container_name: coolify-testing-host
|
||||||
image: coolify-testing-host
|
|
||||||
build:
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
context: ./docker/testing-host
|
|
||||||
volumes:
|
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
- ./docker/testing-host/supervisord.conf:/etc/supervisor/conf.d/supervisord.conf
|
|
||||||
networks:
|
|
||||||
- coolify
|
|
||||||
testing-host2:
|
testing-host2:
|
||||||
|
<<: *testing-host-base
|
||||||
container_name: coolify-testing-host-2
|
container_name: coolify-testing-host-2
|
||||||
image: coolify-testing-host
|
|
||||||
build:
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
context: ./docker/testing-host
|
|
||||||
volumes:
|
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
- ./docker/testing-host/supervisord.conf:/etc/supervisor/conf.d/supervisord.conf
|
|
||||||
networks:
|
|
||||||
- coolify
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
db-coolify:
|
db-coolify:
|
||||||
|
Loading…
Reference in New Issue
Block a user