Skip to content

Commit b3e9b4e

Browse files
authored
Added ${PWD##*/} to adapt to docker image naming
1 parent ff224c3 commit b3e9b4e

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

docker/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ First, install [Docker Compose](https://docs.docker.com/compose/install/).
44

55
Second, initialize a new UserFrosting project:
66

7-
1. Copy `app/sprinkles.example.json` to `app/sprinkles.json`
7+
1. Run `cp app/sprinkles.example.json app/sprinkles.json`
88
2. Run `chmod 777 app/{logs,cache,sessions}` to fix file permissions for web server. (NOTE: File
99
permissions should be properly secured in a production environment!)
1010
or run `sudo chown -R 33 app/{logs,cache,sessions}` (Changes the user to the www-data user of the image, more information [here](https://serversforhackers.com/c/dckr-file-permissions) )
@@ -15,13 +15,13 @@ Now you can start up the entire Nginx + PHP + MySQL stack using docker with:
1515

1616
$ sudo docker-compose up -d
1717

18-
On the first run you need to init the database (your container name may be different depending on the name of your root directory):
18+
On the first run you need to init the database (Be sure to execute this in the same directory, `${PWD##*/}` is a statement to get your current working directorys name):
1919

20-
$ sudo docker exec -it -u www-data userfrosting_php_1 bash -c 'php bakery migrate'
20+
$ sudo docker exec -it -u www-data ${PWD##*/}_php_1 bash -c 'php bakery migrate'
2121

22-
You also need to setup the first admin user (again, your container name may be different depending on the name of your root directory):
22+
You also need to setup the first admin user (again, `${PWD##*/}` is a statement to get your current working directorys name):
2323

24-
$ sudo docker exec -it -u www-data userfrosting_php_1 bash -c 'php bakery create-admin'
24+
$ sudo docker exec -it -u www-data ${PWD##*/}_php_1 bash -c 'php bakery create-admin'
2525

2626
Now visit http://localhost:8570/ to see your UserFrosting homepage!
2727

0 commit comments

Comments
 (0)