mirror of
https://github.com/snowykami/neo-blog.git
synced 2025-09-04 00:06:22 +00:00
⚡️ feat: 更新 Docker 配置,优化前端环境变量设置并添加部署工作流
This commit is contained in:
0
.gitea/workflows/deploy.yaml
Normal file
0
.gitea/workflows/deploy.yaml
Normal file
1
.github/workflows/build.yaml
vendored
1
.github/workflows/build.yaml
vendored
@ -9,7 +9,6 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build-and-push:
|
build-and-push:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
@ -1,16 +1,18 @@
|
|||||||
services:
|
services:
|
||||||
frontend:
|
frontend:
|
||||||
container_name: neo-blog-frontend
|
container_name: neo-blog-frontend
|
||||||
|
environment:
|
||||||
|
- NEXT_PUBLIC_API_BASE_URL=http://neo-blog-backend:8888
|
||||||
|
image: snowykami/neo-blog-frontend:latest
|
||||||
networks:
|
networks:
|
||||||
- neo-blog-network
|
- neo-blog-network
|
||||||
image: snowykami/neo-blog-frontend:latest
|
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
backend:
|
backend:
|
||||||
container_name: neo-blog-backend
|
container_name: neo-blog-backend
|
||||||
|
image: snowykami/neo-blog-backend:latest
|
||||||
networks:
|
networks:
|
||||||
- neo-blog-network
|
- neo-blog-network
|
||||||
image: snowykami/neo-blog-backend:latest
|
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- ./data:/app/data
|
- ./data:/app/data
|
||||||
|
@ -19,7 +19,7 @@ const nextConfig: NextConfig = {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
async rewrites() {
|
async rewrites() {
|
||||||
const backendUrl = (process.env.NEXT_PUBLIC_API_BASE_URL || "http://localhost:8888")
|
const backendUrl = (process.env.NEXT_PUBLIC_API_BASE_URL || "http://neo-blog-backend:8888")
|
||||||
console.log("Using development API base URL:", backendUrl);
|
console.log("Using development API base URL:", backendUrl);
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user