feature: Docker initial start

This commit is contained in:
Keith Solomon
2025-02-09 17:39:17 -06:00
parent 0f8b3ed157
commit 5a837c19e1
4 changed files with 65 additions and 1056 deletions

8
.dockerignore Normal file
View File

@@ -0,0 +1,8 @@
.vscode/
node_modules/
dist/
build/
Temp/
src/
*-bak*
*.log

File diff suppressed because one or more lines are too long

29
docker-compose.yml Normal file
View File

@@ -0,0 +1,29 @@
services:
app:
container_name: BillTrak
restart: unless-stopped
build:
context: .
dockerfile: Dockerfile
# depends_on:
# - redis
# environment:
# - REDIS_HOST=redis
# - REDIS_PORT=6379
ports:
- "8888:80" # Map port 8080 on the host to port 80 in the container
volumes:
- .:/var/www/html # Mount the current directory for live development
- ./data/bills.db:/var/www/html/data/bills.db # Persist SQLite data
# redis:
# container_name: redis
# restart: unless-stopped
# image: redis:latest
# ports:
# - "6379:6379"

27
dockerfile Normal file
View File

@@ -0,0 +1,27 @@
# Use an official PHP image with Apache
FROM php:8.3-apache
# Install necessary extensions
RUN apt-get update && apt-get install -y \
libsqlite3-dev \
unzip \
&& docker-php-ext-install pdo pdo_sqlite
# Enable mod_rewrite for Apache (required for Laravel/other frameworks)
RUN a2enmod rewrite
# Set the working directory
WORKDIR /var/www/html
# Copy application files to the container
COPY . /var/www/html
# Set proper permissions for the application
RUN chown -R www-data:www-data /var/www/html \
&& chmod -R 755 /var/www/html
# Expose port 80
EXPOSE 80
# Start Apache in foreground mode
CMD ["apache2-foreground"]