Skip to content

Commit 8721e0e

Browse files
committed
Fix ips url, port compatibility with serve
1 parent e102411 commit 8721e0e

File tree

5 files changed

+7
-13
lines changed

5 files changed

+7
-13
lines changed

Dockerfile

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
FROM node:18 as build-deps
22

3-
EXPOSE 8080
3+
EXPOSE 3000
44

55
# ENV DIRPATH /opt/app
6-
ENV REACT_APP_REAL_SERVER_BASE=https://smart-health-links-server.cirg.washington.edu/api
76
ENV NODE_ENV production
87

98
WORKDIR /opt/app
@@ -19,5 +18,4 @@ RUN npm run build
1918

2019
RUN cp build/404.html build/index.html
2120

22-
23-
CMD ["npm", "run", "build"]
21+
CMD ["npm", "run", "dev"]

docker-compose.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ services:
44
shlips:
55
build: ./
66
ports:
7-
- "127.0.0.1:${EXTERNAL_PORT:-9003}:8080"
7+
- "127.0.0.1:${EXTERNAL_PORT:-9003}:3000"

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "0.0.1",
44
"private": true,
55
"scripts": {
6+
"start": "npm install -g serve && serve -s build",
67
"dev": "vite dev",
78
"build": "vite build",
89
"preview": "vite preview",

src/lib/config.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { dev } from '$app/environment';
33

44
export const API_BASE = 'https://smart-health-links-server.cirg.washington.edu/api';
55
export const VIEWER_BASE = new URL(
6-
`/ips${dev ? '/index.html' : ''}#`,
7-
// `/ips/index.html#`,
6+
// `/ips${dev ? '/index.html' : ''}#`,
7+
`/ips/index.html#`,
88
window.location.href
99
).toString();
1010
export const EXAMPLE_IPS =

vite.config.ts

+1-6
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,8 @@ import { defineConfig } from 'vite';
33

44
export default defineConfig(({ mode }) => ({
55
plugins: [sveltekit()],
6-
resolve: {
7-
alias: {
8-
$ips: mode === "production" ? "/ips" : "/ips/index.html",
9-
},
10-
},
116
server: {
127
host: true,
13-
port: 8080
8+
port: 3000
149
}
1510
}));

0 commit comments

Comments
 (0)