Created
January 26, 2022 05:04
-
-
Save biscuitrainbow/397f2b7361e86dc4b67f47e364fac1bb to your computer and use it in GitHub Desktop.
Deployment config
This file contains 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
server { | |
listen 80; | |
index index.php index.html | |
server_name kiccamtlearning.com; | |
error_log /var/log/nginx/error.log; | |
access_log /var/log/nginx/access.log; | |
root /var/www/html/public; | |
location / { | |
try_files $uri $uri/ /index.php?$query_string; | |
} | |
location ~ \.php$ { | |
try_files $uri =404; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass php:9000; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_param PATH_INFO $fastcgi_path_info; | |
} | |
} | |
server { | |
listen 443 ssl; | |
index index.php index.html | |
server_name kiccamtlearning.com; | |
error_log /var/log/nginx/error.log; | |
access_log /var/log/nginx/access.log; | |
root /var/www/html/public; | |
location / { | |
try_files $uri $uri/ /index.php?$query_string; | |
} | |
location ~ \.php$ { | |
try_files $uri =404; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass php:9000; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_param PATH_INFO $fastcgi_path_info; | |
} | |
ssl_certificate /etc/nginx/certs/self-signed/kiccamtelearning.com.pem; | |
ssl_certificate_key /etc/nginx/certs/self-signed/kiccamtelearning.com-key.pem; | |
} |
This file contains 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' | |
networks: | |
laravel: | |
driver: bridge | |
services: | |
nginx: | |
build: | |
context: . | |
dockerfile: nginx.prod.dockerfile | |
container_name: webserver | |
ports: | |
- 8000:80 | |
- 4433:443 | |
volumes: | |
- ./:/var/www/html | |
depends_on: | |
- php | |
- mysql | |
networks: | |
- laravel | |
mysql: | |
image: mysql:5.7.22 | |
container_name: mysql | |
restart: unless-stopped | |
tty: true | |
ports: | |
- "3307:3306" | |
volumes: | |
- ./mysql:/var/lib/mysql | |
user: "1000:1000" | |
environment: | |
MYSQL_DATABASE: laravel | |
MYSQL_USER: homestead | |
MYSQL_PASSWORD: secret | |
MYSQL_ROOT_PASSWORD: secret | |
SERVICE_TAGS: dev | |
SERVICE_NAME: mysql | |
networks: | |
- laravel | |
php: | |
build: | |
context: . | |
dockerfile: php.dockerfile | |
container_name: php | |
volumes: | |
- ./:/var/www/html | |
ports: | |
- "9000:9000" | |
networks: | |
- laravel | |
composer: | |
image: composer:latest | |
container_name: composer | |
volumes: | |
- ./:/var/www/html | |
working_dir: /var/www/html | |
networks: | |
- laravel | |
phpmyadmin: | |
image: phpmyadmin/phpmyadmin | |
restart: always | |
container_name: phpmyadmin | |
depends_on: | |
- mysql | |
ports: | |
- "8081:80" | |
environment: | |
PMA_HOST: mysql | |
MYSQL_ROOT_PASSWORD: secret | |
networks: | |
- laravel | |
npm: | |
image: node:16-alpine | |
container_name: npm | |
volumes: | |
- ./:/var/www/html | |
working_dir: /var/www/html | |
entrypoint: [ 'npm' ] | |
networks: | |
- laravel | |
artisan: | |
build: | |
context: . | |
dockerfile: php.dockerfile | |
container_name: artisan | |
volumes: | |
- ./:/var/www/html | |
depends_on: | |
- mysql | |
working_dir: /var/www/html | |
entrypoint: [ 'php', '/var/www/html/artisan' ] | |
networks: | |
- laravel |
This file contains 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 nginx:stable-alpine | |
ADD ./nginx/default.prod.conf /etc/nginx/conf.d/default.conf | |
ADD ./nginx/certs /etc/nginx/certs/self-signed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment