Add Docker and Coolify deployment setup
Add the container configuration, environment templates, and storage settings needed to deploy SPOTA with Docker and Coolify.
This commit is contained in:
51
docker-compose.yml
Normal file
51
docker-compose.yml
Normal file
@@ -0,0 +1,51 @@
|
||||
services:
|
||||
app:
|
||||
build: .
|
||||
container_name: spota-app
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "${APP_PORT:-8080}:80"
|
||||
environment:
|
||||
APP_URL: ${APP_URL:-http://localhost:8080}
|
||||
DB_HOST: ${DB_HOST:-db}
|
||||
DB_USER: ${DB_USER:-spota_user}
|
||||
DB_PASSWORD: ${DB_PASSWORD:-spota_password}
|
||||
DB_NAME: ${DB_NAME:-spota_spotadb}
|
||||
DB_SPOTA: ${DB_SPOTA:-spota_spotadb}
|
||||
DB_KONSULTASI: ${DB_KONSULTASI:-spota_konsultasi}
|
||||
DB_BIO: ${DB_BIO:-spota_spotadb}
|
||||
DB_DOSEN: ${DB_DOSEN:-spota_spotadb}
|
||||
SERVICE_DB_NAME: ${SERVICE_DB_NAME:-spota_spotadb}
|
||||
PHP_DISPLAY_ERRORS: ${PHP_DISPLAY_ERRORS:-1}
|
||||
FILES_STORAGE_PATH: ${FILES_STORAGE_PATH:-/var/www/html/files}
|
||||
volumes:
|
||||
- ./files:/var/www/html/files
|
||||
- ./img:/var/www/html/img
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
|
||||
db:
|
||||
image: mysql:8.0
|
||||
container_name: spota-db
|
||||
restart: unless-stopped
|
||||
command: --default-authentication-plugin=mysql_native_password --character-set-server=latin1 --collation-server=latin1_swedish_ci
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-root_password}
|
||||
MYSQL_USER: ${DB_USER:-spota_user}
|
||||
MYSQL_PASSWORD: ${DB_PASSWORD:-spota_password}
|
||||
MYSQL_DATABASE: ${DB_NAME:-spota_spotadb}
|
||||
ports:
|
||||
- "${DB_PORT:-3307}:3306"
|
||||
volumes:
|
||||
- db_data:/var/lib/mysql
|
||||
- ./docker/mysql-init:/docker-entrypoint-initdb.d:ro
|
||||
- ./spota_db:/spota_db:ro
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "mysqladmin ping -h localhost -uroot -p$${MYSQL_ROOT_PASSWORD}"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 20
|
||||
|
||||
volumes:
|
||||
db_data:
|
||||
Reference in New Issue
Block a user