Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jankeromnes committed Dec 17, 2020
0 parents commit cd0c42f
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .gitpod.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM gitpod/workspace-mysql

USER gitpod

# Install php-dev
RUN sudo apt-get update -q \
&& sudo apt-get install -y php-dev

# Build and install Xdebug
RUN wget http://xdebug.org/files/xdebug-2.9.1.tgz \
&& tar -xvzf xdebug-2.9.1.tgz \
&& cd xdebug-2.9.1 \
&& phpize \
&& ./configure \
&& make \
&& sudo mkdir -p /usr/lib/php/20190902 \
&& sudo cp modules/xdebug.so /usr/lib/php/20190902 \
&& sudo bash -c "echo -e '\nzend_extension = /usr/lib/php/20190902/xdebug.so\n[XDebug]\nxdebug.remote_enable = 1\nxdebug.remote_autostart = 1\n' >> /etc/php/7.4/cli/php.ini"

# Export environment variables
ENV DATABASE_USER=root
ENV DATABASE_HOST=127.0.0.1
ENV DATABASE_PASSWORD=
8 changes: 8 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
image:
file: .gitpod.Dockerfile

# List the start up tasks. You can start them in parallel in multiple terminals. See https://www.gitpod.io/docs/config-start-tasks/
tasks:
- init: ./setup.sh
- before: wget https://get.symfony.com/cli/installer -O - | bash
command: export PATH="$HOME/.symfony/bin:$PATH" && symfony server:start
8 changes: 8 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

# Install databases
mysql -e 'CREATE DATABASE app;'
mysql -e 'CREATE DATABASE app_test;'

# Install Composer dependencies
composer install

0 comments on commit cd0c42f

Please sign in to comment.