Set up dev environment with Nix
This commit is contained in:
parent
7409e3f0ef
commit
a2c00d9377
|
@ -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"
|
|
@ -0,0 +1,16 @@
|
|||
{ pkgs ? import <nixpkgs> { } }:
|
||||
|
||||
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
|
||||
'';
|
||||
}
|
Loading…
Reference in New Issue