mirror of
https://github.com/Solo-Web-Works/BillTrak.git
synced 2026-01-29 06:20:34 +00:00
✨feature: Docker initial start
This commit is contained in:
8
.dockerignore
Normal file
8
.dockerignore
Normal file
@@ -0,0 +1,8 @@
|
||||
.vscode/
|
||||
node_modules/
|
||||
dist/
|
||||
build/
|
||||
Temp/
|
||||
src/
|
||||
*-bak*
|
||||
*.log
|
||||
1057
css/style.css
1057
css/style.css
File diff suppressed because one or more lines are too long
29
docker-compose.yml
Normal file
29
docker-compose.yml
Normal 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
27
dockerfile
Normal 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"]
|
||||
Reference in New Issue
Block a user