Initial commit
This commit is contained in:
74
docker-compose.yml
Normal file
74
docker-compose.yml
Normal file
@@ -0,0 +1,74 @@
|
||||
# docker-compose.yml
|
||||
|
||||
services:
|
||||
php:
|
||||
build:
|
||||
context: ./src/vkv
|
||||
dockerfile: Dockerfile
|
||||
target: app
|
||||
image: vkv-php:latest
|
||||
container_name: "vkv-php"
|
||||
hostname: "vkv-php"
|
||||
restart: no
|
||||
environment:
|
||||
APP_ENV: production
|
||||
APP_DEBUG: "false"
|
||||
env_file:
|
||||
- .env
|
||||
volumes:
|
||||
- /home/data/vkv/storage:/var/www/html/storage
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
nginx:
|
||||
#image: nginx:1.21.3
|
||||
build:
|
||||
context: ./src/vkv
|
||||
dockerfile: Dockerfile
|
||||
target: nginx
|
||||
image: vkv-web:latest
|
||||
container_name: "vkv-web"
|
||||
hostname: "vkv-web"
|
||||
restart: no
|
||||
volumes:
|
||||
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
|
||||
#- ./src/vkv/public:/var/www/html/public:ro
|
||||
depends_on:
|
||||
- php
|
||||
|
||||
db:
|
||||
image: mariadb:10.9
|
||||
hostname: "vkv-db"
|
||||
restart: no
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD_FILE: "/run/secrets/mysql_root_password"
|
||||
MYSQL_DATABASE: "vkv"
|
||||
MYSQL_USER: "vkv"
|
||||
MYSQL_PASSWORD_FILE: "/run/secrets/mysql_password"
|
||||
secrets:
|
||||
- mysql_password
|
||||
- mysql_root_password
|
||||
volumes:
|
||||
- "/home/data/vkv/mariadb:/var/lib/mysql"
|
||||
command: mysqld --character-set-server=utf8 --collation-server=utf8_unicode_ci --innodb-flush-log-at-trx-commit=0
|
||||
|
||||
queue:
|
||||
build:
|
||||
context: ./src/vkv
|
||||
dockerfile: Dockerfile
|
||||
target: app
|
||||
container_name: "vkv-queue"
|
||||
hostname: "vkv-queue"
|
||||
env_file:
|
||||
- .env
|
||||
command: ["php", "artisan", "queue:work", "--queue=evaluation,default", "--sleep=1", "--tries=1"]
|
||||
volumes:
|
||||
- /home/data/vkv/storage:/var/www/html/storage
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
secrets:
|
||||
mysql_root_password:
|
||||
file: ./secrets/mysql_root_password
|
||||
mysql_password:
|
||||
file: ./secrets/mysql_password
|
||||
Reference in New Issue
Block a user