Skip to content

Commit 9bf5028

Browse files
author
Hauke Ingwersen
committed
added docker-compose.text.yml and test-command.sh
1 parent e7a2406 commit 9bf5028

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

docker-compose.test.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: '3.7'
2+
3+
services:
4+
sup:
5+
build: .
6+
command: /root/test/test-command.sh
7+
environment:
8+
- STARTUP_COMMAND1=composer --version
9+
- STARTUP_COMMAND2=php --version
10+
- STARTUP_COMMAND3=chmod +x /root/test/test-command.sh
11+
volumes:
12+
- ./test:/root/test

test/test-command.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
# Clean the app folder
6+
cd /opt/
7+
rm -rf app
8+
9+
# Create laravel project into app
10+
composer create-project --prefer-dist laravel/laravel app
11+
12+
# Start services in the background.
13+
runsvdir /etc/service &
14+
15+
# Check if the Services are available
16+
wait-for-it.sh --host=localhost --port=8080

0 commit comments

Comments
 (0)