dockerize
This commit is contained in:
parent
f9e89d1289
commit
0fbc7ddd20
34
Dockerfile
Normal file
34
Dockerfile
Normal file
@ -0,0 +1,34 @@
|
||||
FROM php:8.2-cli
|
||||
|
||||
# Install system dependencies
|
||||
RUN apt-get update && apt-get install -y \
|
||||
git \
|
||||
unzip \
|
||||
libzip-dev \
|
||||
libicu-dev \
|
||||
&& docker-php-ext-install \
|
||||
zip \
|
||||
intl \
|
||||
pdo_mysql
|
||||
|
||||
# Install Composer
|
||||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||
|
||||
# Install Symfony CLI
|
||||
RUN curl -sS https://get.symfony.com/cli/installer | bash && \
|
||||
mv /root/.symfony5/bin/symfony /usr/local/bin/symfony
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /var/www/html
|
||||
|
||||
# Copy application files
|
||||
COPY . .
|
||||
|
||||
# Install dependencies
|
||||
RUN composer install --no-interaction --optimize-autoloader
|
||||
|
||||
# Expose port
|
||||
EXPOSE 8000
|
||||
|
||||
# Command to run Symfony server
|
||||
CMD ["symfony", "serve", "--port=8000", "--no-tls", "--allow-http", "--allow-all-ip"]
|
||||
16
docker-compose.server.yml
Normal file
16
docker-compose.server.yml
Normal file
@ -0,0 +1,16 @@
|
||||
services:
|
||||
workcalendar:
|
||||
hostname: workcalendar
|
||||
restart: always
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
- APP_ENV=dev
|
||||
- APP_DEBUG=1
|
||||
networks:
|
||||
- proxy
|
||||
|
||||
networks:
|
||||
proxy:
|
||||
external: true
|
||||
8
docker-compose.yml
Normal file
8
docker-compose.yml
Normal file
@ -0,0 +1,8 @@
|
||||
services:
|
||||
web:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
- APP_ENV=dev
|
||||
- APP_DEBUG=1
|
||||
Loading…
x
Reference in New Issue
Block a user