Skip to content
This repository was archived by the owner on Apr 1, 2021. It is now read-only.

Commit 50e7fd8

Browse files
committed
Merge branch 'feature/docker' into develop
2 parents 7cec183 + 0213123 commit 50e7fd8

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,18 @@ COPY deploy/web/site.conf /etc/nginx/sites-available/default
4949
COPY deploy/web/nginx.conf /etc/nginx/nginx.conf
5050
COPY deploy/web/mime.types /etc/nginx/mime.types
5151
COPY deploy/web/php.ini /usr/local/etc/php/php.ini
52-
COPY --from=compiler /var/www /var/www
5352

5453
# Force HTTPS
5554
ARG FORCE_HTTPS=false
5655
RUN if [ ${FORCE_HTTPS} = true ]; then \
5756
sed -i 's/# fastcgi_param HTTPS/fastcgi_param HTTPS/' /etc/nginx/sites-available/default \
5857
;fi
5958

59+
COPY --from=compiler /var/www /var/www
6060
RUN composer dump-autoload --no-dev --optimize
61-
RUN php artisan config:cache \
61+
RUN grep -q "APP_KEY=" .env || echo "APP_KEY=" >> .env
62+
RUN php artisan key:generate \
63+
&& php artisan config:cache \
6264
&& php artisan route:cache \
6365
&& php artisan view:cache
6466
RUN chown -R www-data:www-data /var/www

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ npm run hot
5858
## Using Docker Compose
5959

6060
### For Development
61-
62-
* Create and run Container
61+
* Create and start Container
6362
```bash
6463
docker-compose up -d dev
6564
```
@@ -74,6 +73,7 @@ docker-compose exec dev bash
7473
composer install
7574
npm install
7675
```
76+
7777
* Compile Static Asset
7878
```bash
7979
## Single run compile
@@ -88,11 +88,12 @@ npm run hot
8888
* Open browser, goto `http://localhost:8888`
8989

9090
### For Production
91-
* Create and run Container
91+
* Create and start Container
9292
```
9393
docker-compose up -d prod
9494
```
95-
* Open browser, goto `http://localhost:88`
95+
96+
* Open browser, goto [http://localhost:88](http://localhost:88)
9697

9798
## License
9899
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details

0 commit comments

Comments
 (0)