chore: copy code files into images for Coolify & ignore local mounts
This commit is contained in:
@@ -0,0 +1,10 @@
|
|||||||
|
.git
|
||||||
|
.gitignore
|
||||||
|
docker-compose.override.yaml
|
||||||
|
docker-compose.override.yml
|
||||||
|
docker/
|
||||||
|
sistem-km-next/node_modules/
|
||||||
|
sistem-km-next/.next/
|
||||||
|
sistem-km-next/out/
|
||||||
|
*.sql
|
||||||
|
*.log
|
||||||
@@ -49,3 +49,8 @@ sistem-km-next/sistem-km-old
|
|||||||
|
|
||||||
# general databases dumps
|
# general databases dumps
|
||||||
*.sql
|
*.sql
|
||||||
|
|
||||||
|
# local docker compose override config
|
||||||
|
docker-compose.override.yaml
|
||||||
|
docker-compose.override.yml
|
||||||
|
|
||||||
|
|||||||
+6
-8
@@ -4,10 +4,10 @@ services:
|
|||||||
# 1. PHP + Apache Web App (for Root Portal, SPBU, Parsil, and Chloropleth)
|
# 1. PHP + Apache Web App (for Root Portal, SPBU, Parsil, and Chloropleth)
|
||||||
# Coolify's Traefik reverse proxy routes traffic to this service via the domain set in Coolify UI.
|
# Coolify's Traefik reverse proxy routes traffic to this service via the domain set in Coolify UI.
|
||||||
php-app:
|
php-app:
|
||||||
build: ./docker/php
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: ./docker/php/Dockerfile
|
||||||
container_name: gis_php_app
|
container_name: gis_php_app
|
||||||
volumes:
|
|
||||||
- .:/var/www/html
|
|
||||||
environment:
|
environment:
|
||||||
- DB_HOST=db
|
- DB_HOST=db
|
||||||
- DB_DATABASE=spbu_db
|
- DB_DATABASE=spbu_db
|
||||||
@@ -21,13 +21,11 @@ services:
|
|||||||
# 2. Next.js App Service
|
# 2. Next.js App Service
|
||||||
# Coolify's Traefik reverse proxy routes traffic to this service via the domain set in Coolify UI.
|
# Coolify's Traefik reverse proxy routes traffic to this service via the domain set in Coolify UI.
|
||||||
next-app:
|
next-app:
|
||||||
build: ./docker/nextjs
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: ./docker/nextjs/Dockerfile
|
||||||
container_name: gis_next_app
|
container_name: gis_next_app
|
||||||
working_dir: /app
|
working_dir: /app
|
||||||
volumes:
|
|
||||||
- ./sistem-km-next:/app
|
|
||||||
- /app/node_modules # Anonymous volume to isolate node_modules from host machine
|
|
||||||
- /app/.next # Anonymous volume for nextjs build artifacts
|
|
||||||
environment:
|
environment:
|
||||||
- NEXT_PUBLIC_SUPABASE_URL=https://gzpvygrsfdtzykyqbnes.supabase.co
|
- NEXT_PUBLIC_SUPABASE_URL=https://gzpvygrsfdtzykyqbnes.supabase.co
|
||||||
- NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imd6cHZ5Z3JzZmR0enlreXFibmVzIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzkxNTUxNTIsImV4cCI6MjA5NDczMTE1Mn0.bP4qLY6PVT9UplSxB276tZ5HWClIkiuZ_-Yx3IlL8Dw
|
- NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imd6cHZ5Z3JzZmR0enlreXFibmVzIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzkxNTUxNTIsImV4cCI6MjA5NDczMTE1Mn0.bP4qLY6PVT9UplSxB276tZ5HWClIkiuZ_-Yx3IlL8Dw
|
||||||
|
|||||||
@@ -5,12 +5,20 @@ RUN apk add --no-cache libc6-compat
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy dependency files first
|
||||||
|
COPY sistem-km-next/package*.json ./
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
# Copy the rest of the application files
|
||||||
|
COPY sistem-km-next/ .
|
||||||
|
|
||||||
# Expose Next.js port
|
# Expose Next.js port
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
ENV PORT 3000
|
ENV PORT 3000
|
||||||
ENV HOSTNAME "0.0.0.0"
|
ENV HOSTNAME "0.0.0.0"
|
||||||
|
|
||||||
# Automatically install dependencies (to handle architecture differences between Windows host and Linux container)
|
# Start Next.js app in development mode
|
||||||
# and run Next.js in development mode
|
CMD ["npm", "run", "dev"]
|
||||||
CMD ["sh", "-c", "npm install && npm run dev"]
|
|
||||||
|
|||||||
@@ -12,5 +12,8 @@ RUN echo "LimitRequestFieldSize 65536" >> /etc/apache2/apache2.conf
|
|||||||
# Set working directory
|
# Set working directory
|
||||||
WORKDIR /var/www/html
|
WORKDIR /var/www/html
|
||||||
|
|
||||||
|
# Copy source files
|
||||||
|
COPY . /var/www/html/
|
||||||
|
|
||||||
# Expose port 80
|
# Expose port 80
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|||||||
Reference in New Issue
Block a user