Spaces:
Sleeping
Sleeping
Commit
·
2729dea
1
Parent(s):
ecbb166
Delete Dockerfile
Browse files- Dockerfile +0 -64
Dockerfile
DELETED
@@ -1,64 +0,0 @@
|
|
1 |
-
# syntax=docker/dockerfile:1.2
|
2 |
-
FROM php:8.2-fpm
|
3 |
-
|
4 |
-
# Install system dependencies
|
5 |
-
RUN apt-get update && apt-get install -y \
|
6 |
-
libonig-dev \
|
7 |
-
libpng-dev \
|
8 |
-
libxml2-dev \
|
9 |
-
zip \
|
10 |
-
unzip \
|
11 |
-
git \
|
12 |
-
curl
|
13 |
-
|
14 |
-
# Install PHP extensions
|
15 |
-
RUN docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd
|
16 |
-
|
17 |
-
# Download and install Composer
|
18 |
-
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
19 |
-
|
20 |
-
# Set working directory to /app
|
21 |
-
WORKDIR /app
|
22 |
-
|
23 |
-
ARG CACHEBUST=1
|
24 |
-
RUN echo "Cache bust: $CACHEBUST" > /dev/null
|
25 |
-
|
26 |
-
# Check if we are in a local or online environment
|
27 |
-
ARG APP_ENV
|
28 |
-
|
29 |
-
# If online, clone the private repository without using cache
|
30 |
-
RUN --mount=type=secret,id=GITHUB_PAT \
|
31 |
-
if [ "$APP_ENV" != "local" ] ; then \
|
32 |
-
rm -rf /app/* /app/.* || true && \
|
33 |
-
git clone https://lucianotonet:$(cat /run/secrets/GITHUB_PAT)@github.com/lucianotonet/dev-assistant-server.git . ; \
|
34 |
-
fi
|
35 |
-
|
36 |
-
# If local, just copy the files
|
37 |
-
COPY . /app
|
38 |
-
|
39 |
-
# Install PHP dependencies
|
40 |
-
RUN --mount=type=secret,id=OPENAI_API_KEY \
|
41 |
-
composer install
|
42 |
-
|
43 |
-
# Run initial Laravel commands
|
44 |
-
RUN php artisan storage:link && \
|
45 |
-
php artisan config:cache && \
|
46 |
-
php artisan route:cache && \
|
47 |
-
php artisan view:cache
|
48 |
-
|
49 |
-
# Alterar o proprietário e as permissões do diretório de logs
|
50 |
-
RUN chown -R www-data:www-data /app/storage && \
|
51 |
-
chmod -R 775 /app/storage && \
|
52 |
-
chown -R www-data:www-data /app/bootstrap/cache && \
|
53 |
-
chmod -R 775 /app/bootstrap/cache
|
54 |
-
|
55 |
-
EXPOSE 7860
|
56 |
-
|
57 |
-
# Copy the script into the container
|
58 |
-
COPY start.sh /start.sh
|
59 |
-
|
60 |
-
# Make the script executable
|
61 |
-
RUN chmod +x /start.sh
|
62 |
-
|
63 |
-
# Run the script when the container starts
|
64 |
-
CMD ["/start.sh"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|