[Docker] Final fixes in Docker setup README
This commit is contained in:
parent
8e19811b0f
commit
79939ebb5c
@ -14,13 +14,13 @@
|
|||||||
3. Copy `.env.example` to `.env`. Leave the `.env` file as is for now.
|
3. Copy `.env.example` to `.env`. Leave the `.env` file as is for now.
|
||||||
4. Copy `docker-compose.example.yml` to `docker-compose.yml`.
|
4. Copy `docker-compose.example.yml` to `docker-compose.yml`.
|
||||||
5. Edit `docker-compose.yml` (with your text editor) and modify configuration/volumes to match your needs.
|
5. Edit `docker-compose.yml` (with your text editor) and modify configuration/volumes to match your needs.
|
||||||
6. Edit `../.env` and modify your database credentials to match the ones you set in `docker-compose.yml`
|
6. Edit `.env` and modify your database credentials to match the ones you set in `docker-compose.yml`
|
||||||
- `DB_HOST` (db) and `DB_PORT` (5432) can generally be left as is
|
- `DB_HOST` (db) and `DB_PORT` (5432) can generally be left as is
|
||||||
7. Navigate to the `.docker` directory in the repository.
|
7. Navigate to the `.docker` directory in the repository.
|
||||||
8. Copy `examples/hovedprosjekt.example.conf` to `nginx/hovedprosjekt.conf`.
|
8. Copy `examples/hovedprosjekt.example.conf` to `nginx/hovedprosjekt.conf`.
|
||||||
9. Edit `nginx/hovedprosjekt.conf` and modify domain/TLS configuration to your needs.
|
9. Edit `nginx/hovedprosjekt.conf` and modify domain/TLS configuration to your needs.
|
||||||
- Make sure that the SSL certificate and key uses the path as the volume mapping in `docker-compose.yml`.
|
- Make sure that the SSL certificate and key uses the path as the volume mapping in `docker-compose.yml`.
|
||||||
10. Run `docker-compose build app`
|
10. Go up one directory (`cd ..`) and run `docker-compose build app`
|
||||||
11. If built successfully, run `docker-compose up -d` to run all containers in "detached" mode.
|
11. If built successfully, run `docker-compose up -d` to run all containers in "detached" mode.
|
||||||
|
|
||||||
## Application setup - First-time setup only
|
## Application setup - First-time setup only
|
||||||
@ -29,9 +29,8 @@ These steps should be run after you have run `docker-compose up -d`, as the cont
|
|||||||
|
|
||||||
1. Go to the project repository: `cd /srv/FLOTWebApp`
|
1. Go to the project repository: `cd /srv/FLOTWebApp`
|
||||||
2. Make sure that the project repository has correct permissions for the user specified in `docker-compose.yml`
|
2. Make sure that the project repository has correct permissions for the user specified in `docker-compose.yml`
|
||||||
- `sudo chown -R 1000: .` will set it to the user with ID "1000". You can see users and their IDs if you `cat /etc/passwd`.
|
- `sudo chown -R 1000:1000 .` will set it to the user/group with ID "1000". You can see users and their IDs if you `cat /etc/passwd`.
|
||||||
3. While still being in the `.docker` directory run: `docker-compose exec app composer install`
|
3. Install Composer dependencies using: `docker-compose exec app composer install`
|
||||||
- This will attach the `app` container and run the following command to install dependencies for the application: `composer install`
|
|
||||||
- Dependency installation might take a while, so be patient.
|
- Dependency installation might take a while, so be patient.
|
||||||
4. Run `docker-compose exec app php artisan key:generate` to generate an app key that's saved in `.env`
|
4. Run `docker-compose exec app php artisan key:generate` to generate an app key that's saved in `.env`
|
||||||
5. Finally, create the database tables with: `docker-compose exec app php artisan migrate`
|
5. Finally, create the database tables with: `docker-compose exec app php artisan migrate`
|
||||||
|
Loading…
Reference in New Issue
Block a user