Skip to content

Commit

Permalink
patch: Add envs for port and host, fix endpoint
Browse files Browse the repository at this point in the history
- Not specifying the port/hostname works when running locally but fails in a production environment
- Fix task type endpoint
- Fix migration metadata
  • Loading branch information
dmtrek14 committed Feb 13, 2024
1 parent 6b8c075 commit 7a1ec87
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Add calculation functions
Revision ID: 6a1ad39b566d
Revises: 2ac6108453f3
Revises: cf4f31d5cd2d
Create Date: 2024-01-05 11:07:57.026492
"""
Expand Down
4 changes: 4 additions & 0 deletions docker/prod.frontend.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,9 @@ USER nextjs

EXPOSE 3000

ENV PORT 3000
# set hostname to localhost
ENV HOSTNAME "0.0.0.0"

CMD ["node", "server.js"]

2 changes: 1 addition & 1 deletion frontend/src/infra/taskType/getTaskTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ApiClient } from '@/infra/lib/apiClient'
import { TaskType } from '@/domain/TaskType'

export const makeGetTaskTypes = (apiClient: ApiClient) => async (): Promise<Array<TaskType>> => {
const response = await apiClient('/v1/timelog/task_types/')
const response = await apiClient('/v1/timelog/task_types')

if (!response.ok) {
throw new Error('Failed to fetch TaskTypes')
Expand Down

0 comments on commit 7a1ec87

Please sign in to comment.