Created
January 13, 2025 15:45
-
-
Save darmariduan/55e13dbec41559c6093d33f9317a8e49 to your computer and use it in GitHub Desktop.
failed to solve: process "/bin/sh -c apt-get update && apt-get install -y --no-install-recommends git unzip libpq-dev libzip-dev libpng-dev libonig-dev curl zip npm libsodium-dev libbcmath-dev" did not complete successfully: exit code: 100
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.8' | |
services: | |
app: | |
build: | |
context: .. | |
dockerfile: docker/Dockerfile | |
container_name: laravel_app | |
working_dir: /var/www | |
volumes: | |
- ../:/var/www | |
- ../docker/supervisord.conf:/etc/supervisor/supervisord.conf | |
ports: | |
- "8000:8000" | |
networks: | |
- laravel_network | |
depends_on: | |
- db | |
- redis | |
env_file: | |
- ../.env # Path relatif ke file .env | |
db: | |
image: postgres:15 | |
container_name: laravel_db | |
environment: | |
POSTGRES_USER: ${DB_USERNAME:-postgres} | |
POSTGRES_PASSWORD: ${DB_PASSWORD:-} | |
POSTGRES_DB: ${DB_DATABASE:-tpp} | |
ports: | |
- "5432:5432" | |
networks: | |
- laravel_network | |
redis: | |
image: redis:alpine | |
container_name: laravel_redis | |
ports: | |
- "6379:6379" | |
networks: | |
- laravel_network | |
vite: | |
image: node:18 | |
container_name: laravel_vite | |
working_dir: /var/www | |
volumes: | |
- ../:/var/www | |
command: ["npm", "run", "dev"] | |
ports: | |
- "5173:5173" | |
networks: | |
- laravel_network | |
queue: | |
build: | |
context: .. | |
dockerfile: docker/Dockerfile | |
container_name: laravel_queue | |
working_dir: /var/www | |
volumes: | |
- ../:/var/www | |
- ../docker/supervisord.conf:/etc/supervisor/supervisord.conf | |
command: ["php", "artisan", "queue:work", "--queue=PresensiQueue"] | |
depends_on: | |
- redis | |
networks: | |
- laravel_network | |
networks: | |
laravel_network: | |
driver: bridge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Base image | |
FROM php:8.3-fpm | |
# Clean and update package lists | |
RUN apt-get clean && rm -rf /var/lib/apt/lists/* && apt-get update | |
# Install software-properties-common and apt-utils | |
RUN apt-get update && apt-get install -y --no-install-recommends software-properties-common apt-utils | |
# Install system dependencies | |
RUN apt-get update && apt-get install -y --no-install-recommends \ | |
git \ | |
unzip \ | |
libpq-dev \ | |
libzip-dev \ | |
libpng-dev \ | |
libonig-dev \ | |
curl \ | |
zip \ | |
npm \ | |
libsodium-dev \ | |
libbcmath-dev | |
# Clean up APT when done | |
RUN apt-get clean && rm -rf /var/lib/apt/lists/* | |
# Install PHP extensions | |
RUN docker-php-ext-install pdo pdo_pgsql pgsql zip gd sodium bcmath | |
# Install Composer | |
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer | |
# Set working directory | |
WORKDIR /var/www | |
# Copy application files | |
COPY . . | |
# Install dependencies | |
RUN composer install | |
RUN npm install && npm run build | |
# Set permissions | |
RUN chown -R www-data:www-data /var/www/storage /var/www/bootstrap/cache | |
# Expose port | |
EXPOSE 9000 | |
# Start PHP-FPM | |
CMD ["php-fpm"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment