forked from shiftrightonce/docker_env
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev.sh
More file actions
executable file
·21 lines (20 loc) · 782 Bytes
/
Copy pathdev.sh
File metadata and controls
executable file
·21 lines (20 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
if [ $# -gt 0 ]; then
if [ $1 = 'setup' ]; then
echo '--- setting up your dev environment ---'
mkdir -p .key
mkdir -p projects
mkdir -p services/surrealdb/data/mydata.db
cp /home/${USER}/.ssh/id_rsa ./.key/id_rsa
cp env.example .env
docker compose build
fi
else
echo "---> Quick help <----"
echo "setup : Setup your environment for the first time".
echo "docker compose up : Starts the containers"
echo "docker compose exec db bash : ssh into the mysql container"
echo "docker compose exec phpfpm bash : ssh into the php environment. This is where you should run composer"
echo "docker compose exec nginx bash: ssh into the web server container"
echo "docker compse exec workspace bash : ssh into the general container"
fi