Skip to content

Commit

Permalink
fix for dockr compose
Browse files Browse the repository at this point in the history
  • Loading branch information
luiztauffer committed Oct 10, 2023
1 parent c6f5f2e commit 9930f0c
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 5 deletions.
3 changes: 2 additions & 1 deletion docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ services:
dockerfile: Dockerfile
image: si-sorting-frontend
container_name: si-sorting-frontend
command: ["npm", "run", "start"]
ports:
- "3000:3000"
- "5173:5173"
environment:
DEPLOY_MODE: compose
volumes:
Expand Down
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ services:
frontend:
image: ghcr.io/catalystneuro/si-sorting-frontend:latest
container_name: si-sorting-frontend
command: ["npm", "run", "start"]
ports:
- "3000:3000"
- "5173:5173"
environment:
DEPLOY_MODE: compose
depends_on:
Expand Down Expand Up @@ -38,6 +39,7 @@ services:
AWS_DEFAULT_REGION: ${AWS_DEFAULT_REGION}
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
DANDI_API_KEY: ${DANDI_API_KEY}
volumes:
- ./results:/results
- ./logs:/logs
Expand Down
4 changes: 2 additions & 2 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ COPY . ./

# RUN yarn build

EXPOSE 3000
EXPOSE 5173

CMD ["yarn", "vite"]
CMD ["npm", "run", "start"]
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@
"last 1 safari version"
]
}
}
}
8 changes: 8 additions & 0 deletions frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,12 @@ import react from '@vitejs/plugin-react-swc'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
server: {
watch: {
usePolling: true,
},
host: true, // needed for the Docker Container port mapping to work
strictPort: true,
port: 5173, // replace this port with any number you want
},
})

0 comments on commit 9930f0c

Please sign in to comment.