Skip to content

Commit ff224c3

Browse files
authored
Code updating notices
1 parent 8777173 commit ff224c3

1 file changed

Lines changed: 18 additions & 5 deletions

File tree

docker/README.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@ Second, initialize a new UserFrosting project:
66

77
1. Copy `app/sprinkles.example.json` to `app/sprinkles.json`
88
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/` (Changes the user to the www-data user in of image, more information [here](https://serversforhackers.com/c/dckr-file-permissions) )
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) )
1111
2. Run `sudo docker-compose run composer install` to install all composer modules.
1212
3. Run `sudo docker-compose run node npm install` to install all npm modules.
1313

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

16-
$ docker-compose up
16+
$ sudo docker-compose up -d
1717

1818
On the first run you need to init the database (your container name may be different depending on the name of your root directory):
1919

20-
$ docker exec -it -u www-data userfrosting_php_1 bash -c 'php bakery migrate'
20+
$ sudo docker exec -it -u www-data userfrosting_php_1 bash -c 'php bakery migrate'
2121

2222
You also need to setup the first admin user (again, your container name may be different depending on the name of your root directory):
2323

24-
$ docker exec -it -u www-data userfrosting_php_1 bash -c 'php bakery create-admin'
24+
$ sudo docker exec -it -u www-data userfrosting_php_1 bash -c 'php bakery create-admin'
2525

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

@@ -34,3 +34,16 @@ You may be tempted to run with this in production but this setup has not been se
3434
- Database credentials are hard-coded so obviously not secure.
3535
- File permissions may be more open than necessary.
3636
- It just hasn't been thoroughly tested in the capacity of being a production system.
37+
38+
## Updating your code
39+
As you might guessed you will have to run
40+
41+
$ sudo docker exec -it -u www-data userfrosting_php_1 bash -c 'php bakery migrate'
42+
43+
again if you want to migrate tables.
44+
You can change `php bakery migrate` to other `bakery` commands as well.
45+
Similary for composer:
46+
47+
$ sudo docker-compose run composer update
48+
49+
See the [Docker](https://docs.docker.com/engine) and [Docker-compose documentation](https://docs.docker.com/compose/) for more details.

0 commit comments

Comments
 (0)