Skip to content

Commit 130409e

Browse files
committed
fix: fixed bugs with running in docker
1 parent e4606e0 commit 130409e

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

app/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ COPY package*.json ./
1111
RUN npm install
1212

1313
# Copy the rest of the application code to the container
14-
COPY ../suppis-nettisivut .
14+
COPY . .
1515

1616
# Build the React app
1717
RUN npm run build

app/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import Main from "./pages/main";
1313
import axios from "axios";
1414

1515
export const core = axios.create({
16-
baseURL: "http://localhost:3001"
16+
baseURL: process.env.API_BASE_URL
1717
});
1818

1919
core.interceptors.request.use(async config => {

core/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ RUN \
1414
apt-get install -y google-chrome-stable && \
1515
rm -rf /var/lib/apt/lists/*s
1616

17-
COPY ../suppis-core ./
17+
COPY . .
1818

1919
RUN npm run build
2020

docker-compose.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ services:
1010
PORT: 3001
1111
FIREBASE_SECRET_KEY_PATH: /app/firebase.json
1212
WHATSAPP_SESSION_PATH: /app/whatsapp
13+
LOG_GROUP_ID: [email protected]
1314
volumes:
1415
- ./core/whatsapp:/app/config/whatsapp
15-
- ./core/firebase.json:/app/config/firebase-admin-secrets
16+
- ./core/firebase.json:/app/firebase.json
1617
dns:
1718
- 8.8.8.8
1819

@@ -21,7 +22,7 @@ services:
2122
ports:
2223
- "3000:80"
2324
environment:
24-
BASE_URL: http://localhost
25+
API_BASE_URL: http://localhost
2526
restart: always
2627
dns:
2728
- 8.8.8.8
@@ -33,7 +34,7 @@ services:
3334
restart: always
3435
depends_on:
3536
- "core"
36-
- "frontend"
37+
- "app"
3738
environment:
3839
API_URL: 'http://core:3001'
3940
volumes:

nginx/nginx.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ http {
1515
}
1616

1717
location / {
18-
proxy_pass http://frontend:80;
18+
proxy_pass http://app:80;
1919
proxy_set_header Host $host;
2020
proxy_set_header X-Real-IP $remote_addr;
2121
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

0 commit comments

Comments
 (0)