diff --git a/Dockerfile.backend b/Dockerfile.backend index 7c9b2612..2abeeeed 100644 --- a/Dockerfile.backend +++ b/Dockerfile.backend @@ -32,6 +32,10 @@ RUN wget -O /tmp/Xray-linux-64.zip https://github.com/XTLS/Xray-core/releases/do chmod +x /app/bin/xray-linux-${TARGETARCH} && \ rm /tmp/Xray-linux-64.zip +RUN mkdir -p /app/log && \ + touch /app/log/3xipl.log && \ + touch /app/log/3xipl-banned.log + # Copy the binary from the builder stage COPY --from=builder /app/x-ui /app/x-ui COPY --from=builder /app/x-ui.sh /app/x-ui.sh diff --git a/docker-compose.yml b/docker-compose.yml index fb6fdd95..2144a848 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,6 +19,8 @@ services: build: context: ./new-frontend dockerfile: Dockerfile + args: + - NEXT_PUBLIC_API_BASE_URL=http://backend:2053 container_name: 3x-ui-frontend restart: unless-stopped ports: diff --git a/new-frontend/Dockerfile b/new-frontend/Dockerfile index c0b6923d..8d19eb14 100644 --- a/new-frontend/Dockerfile +++ b/new-frontend/Dockerfile @@ -8,6 +8,8 @@ RUN corepack enable RUN npm install COPY . . +ARG NEXT_PUBLIC_API_BASE_URL +ENV NEXT_PUBLIC_API_BASE_URL=$NEXT_PUBLIC_API_BASE_URL RUN npm run build # Stage 2: Production environment