diff --git a/Dockerfile b/Dockerfile index 0790a57..798dde4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,14 @@ -# Use the official PHP image with Apache -FROM php:8.1-apache +# Dockerfile +FROM klakegg/hugo:0.83.1-ext-alpine -# Install necessary PHP extensions -RUN docker-php-ext-install pdo pdo_mysql +# Set working directory +WORKDIR /app -# Enable Apache mod_rewrite -RUN a2enmod rewrite +# Copy the site files +COPY . /app -# Set the working directory -WORKDIR /var/www/html - -# Set permissions -RUN chown -R www-data:www-data /var/www/html - -# Start Apache in the foreground -CMD ["apache2-foreground"] +# Build the static site +RUN hugo +# Serve the site +CMD ["hugo", "server", "--bind", "0.0.0.0"] diff --git a/docker-compose.yml b/docker-compose.yml index 20486ed..f069a20 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,24 +1,7 @@ services: - web: + blog-pika: build: . ports: - - "8088:80" + - "1313:1313" volumes: - - ./www/public:/var/www/html - restart: unless-stopped - - # depends_on: - # - db - - # db: - # image: mysql:5.7 - # restart: unless-stopped - # environment: - # MYSQL_ROOT_PASSWORD: rootpassword - # MYSQL_DATABASE: mydatabase - # MYSQL_USER: myuser - # MYSQL_PASSWORD: mypassword - # ports: - # - "3306:3306" - # volumes: - # - ./db_data:/var/lib/mysql + - ./www:/app