Last active
April 14, 2021 13:36
-
-
Save vilmid/500e295b71f60a45f9d8d15a186d581e to your computer and use it in GitHub Desktop.
Laravel + Apache + PostgreSQL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '3' | |
| services: | |
| web: | |
| environment: | |
| COMPOSER_HOME: ./docker/web/.config/composer | |
| COMPOSER_CACHE_DIR: ./docker/web/.cache/composer | |
| ports: | |
| - target: 80 | |
| published: 8000 | |
| - target: 443 | |
| published: 4430 | |
| volumes: | |
| - type: bind | |
| source: ./src/laravel | |
| target: /var/www/laravel | |
| db: | |
| ports: | |
| - target: 5432 | |
| published: 54320 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '3' | |
| services: | |
| web: | |
| build: | |
| context: . | |
| dockerfile: ./docker/web/Dockerfile | |
| depends_on: | |
| - db | |
| db: | |
| image: postgres |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM php:8-apache | |
| COPY --from=composer /usr/bin/composer /usr/bin/composer | |
| ENV APACHE_DOCUMENT_ROOT /var/www/laravel/public | |
| RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf | |
| RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf | |
| RUN chown www-data /var/www -R |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment