fixed backend issue
This commit is contained in:
@@ -14,6 +14,8 @@ services:
|
|||||||
- ADMIN_TOKEN=${ADMIN_TOKEN:-default_insecure_token}
|
- ADMIN_TOKEN=${ADMIN_TOKEN:-default_insecure_token}
|
||||||
- DATA_DIR=/app/data
|
- DATA_DIR=/app/data
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
networks:
|
||||||
|
- internal_net
|
||||||
|
|
||||||
frontend:
|
frontend:
|
||||||
build:
|
build:
|
||||||
@@ -26,3 +28,9 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- backend
|
- backend
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
networks:
|
||||||
|
- internal_net
|
||||||
|
|
||||||
|
networks:
|
||||||
|
internal_net:
|
||||||
|
driver: bridge
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
import Layout from '../layouts/Layout.astro';
|
import Layout from '../layouts/Layout.astro';
|
||||||
|
|
||||||
const API_URL = import.meta.env.PUBLIC_API_URL || 'http://localhost:3000';
|
const API_URL = (typeof process !== 'undefined' ? process.env.PUBLIC_API_URL : import.meta.env.PUBLIC_API_URL) || 'http://localhost:3000';
|
||||||
|
|
||||||
interface Post {
|
interface Post {
|
||||||
slug: string;
|
slug: string;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Layout from '../../layouts/Layout.astro';
|
|||||||
import { marked } from 'marked';
|
import { marked } from 'marked';
|
||||||
|
|
||||||
const { slug } = Astro.params;
|
const { slug } = Astro.params;
|
||||||
const API_URL = import.meta.env.PUBLIC_API_URL || 'http://localhost:3000';
|
const API_URL = (typeof process !== 'undefined' ? process.env.PUBLIC_API_URL : import.meta.env.PUBLIC_API_URL) || 'http://localhost:3000';
|
||||||
|
|
||||||
interface PostDetail {
|
interface PostDetail {
|
||||||
slug: string;
|
slug: string;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
const { path } = Astro.params;
|
const { path } = Astro.params;
|
||||||
const API_URL = import.meta.env.PUBLIC_API_URL || 'http://localhost:3000';
|
const API_URL = (typeof process !== 'undefined' ? process.env.PUBLIC_API_URL : import.meta.env.PUBLIC_API_URL) || 'http://localhost:3000';
|
||||||
|
|
||||||
const response = await fetch(`${API_URL}/uploads/${path}`);
|
const response = await fetch(`${API_URL}/uploads/${path}`);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user