Skip to content

Commit dc9920d

Browse files
authored
Completed installation guide
1 parent b3e9b4e commit dc9920d

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

docker/README.md

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

55
Second, initialize a new UserFrosting project:
6-
7-
1. Run `cp app/sprinkles.example.json app/sprinkles.json`
8-
2. Run `chmod 777 app/{logs,cache,sessions}` to fix file permissions for web server. (NOTE: File
9-
permissions should be properly secured in a production environment!)
10-
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) )
6+
1. Clone the repository `git clone https://github.com/userfrosting/UserFrosting.git .` and change into that directory `cd userfrosting`
7+
1. Run `cp app/sprinkles.example.json app/sprinkles.json` or upload your own (also upload your sprinkles if you have some)
8+
2. 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) )
119
2. Run `sudo docker-compose run composer install` to install all composer modules.
1210
3. Run `sudo docker-compose run node npm install` to install all npm modules.
1311

1412
Now you can start up the entire Nginx + PHP + MySQL stack using docker with:
1513

1614
$ sudo docker-compose up -d
1715

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):
16+
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. Docker uses it to name your container):
1917

2018
$ sudo docker exec -it -u www-data ${PWD##*/}_php_1 bash -c 'php bakery migrate'
2119

@@ -41,7 +39,8 @@ As you might guessed you will have to run
4139
$ sudo docker exec -it -u www-data userfrosting_php_1 bash -c 'php bakery migrate'
4240

4341
again if you want to migrate tables.
44-
You can change `php bakery migrate` to other `bakery` commands as well.
42+
You can change `php bakery migrate` to other `bakery` commands as well.
43+
Be aware that the userfrosting container doesn't know about npm!
4544
Similary for composer:
4645

4746
$ sudo docker-compose run composer update

0 commit comments

Comments
 (0)