Compare commits

...

2 Commits

Author SHA1 Message Date
a0f0e7f44a Added environment variable for app port 2022-11-28 12:04:36 +01:00
6b94757760 Made changes to make the dev environment work 2022-11-15 12:13:01 +01:00
3 changed files with 12 additions and 7 deletions

View File

@ -32,6 +32,7 @@ services:
dockerfile: Dockerfile
restart: always
environment:
- APP_PORT=8000
- DB_HOST=db
- DB_USERNAME=root
ports:
@ -42,5 +43,5 @@ services:
- 9000
- 80
- 443
# volumes:
# - ./WebsiteAPI:/var/www/html
volumes:
- ./php/WebsiteAPI:/var/www/html

View File

@ -33,9 +33,7 @@ WORKDIR /var/www/html
USER $user
COPY ./WebsiteAPI /var/www/html/
# COPY ./WebsiteAPI /var/www/html/
COPY ./entrypoint.sh /var/www/entrypoint.sh
RUN composer install
RUN composer update
CMD ["php","artisan","serve","--port=9000","--host=0.0.0.0"]
CMD ["/var/www/entrypoint.sh"]

6
php/entrypoint.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
composer install
composer update
php artisan migrate
php artisan serve --port=$APP_PORT --host=0.0.0.0