diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 825989c..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,14 +0,0 @@ -version: 3 - -services: - web: - image: trafex/alpine-nginx-php7 - ports: - - "80:80" - volumes: - - ./src:/var/www/html - - ./nginx/site.conf:/etc/nginx/conf.d/server.conf - mariadb: - image: mariadb/server:10.3 - ports: - - "3306:3306" diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..5a15675 --- /dev/null +++ b/shell.nix @@ -0,0 +1,16 @@ +{ pkgs ? import { } }: + +with pkgs; + +mkShell { + buildInputs = [ php mysql57 ]; + + shellHook = '' + rm -rf .mysql && mkdir .mysql + + mysqld --datadir="$(pwd)/.mysql" --socket="$(pwd)/.mysql/mysql.sock" --initialize-insecure + mysqld --datadir="$(pwd)/.mysql" --socket="$(pwd)/.mysql/mysql.sock" --skip-networking & + + mysql --socket="$(pwd)/.mysql/mysql.sock" -u root < $(pwd)/database/db.sql + ''; +}