Skip to content

Commit 6b04a33

Browse files
committed
Create database at the first run
1 parent 63422c8 commit 6b04a33

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

fig.yml

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ web:
1111
environment:
1212
- MYSQL_HOST=mysql
1313
working_dir: /var/www/html
14+
entrypoint: /home/dev/scripts/docker-init.sh
1415
mysql:
1516
image: mysql
1617
environment:

scripts/docker-init.sh

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
mysql -u root -proot -e "CREATE DATABASE IF NOT EXISTS drupal;"
3+
echo "=================================================="
4+
echo
5+
echo " Pranacssorhoz futtasd a következő parancsot:"
6+
echo
7+
echo " fig run --rm --entrypoint bash web"
8+
echo
9+
echo "=================================================="
10+
/usr/sbin/apache2 -D FOREGROUND

0 commit comments

Comments
 (0)