-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into add-go-linter
- Loading branch information
Showing
12 changed files
with
138 additions
and
124 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"phases": { | ||
"install": { | ||
"cmds": [ | ||
"cd server", | ||
"go mod download" | ||
] | ||
}, | ||
"build": { | ||
"cmds": [ | ||
"cd server", | ||
"go build -o app" | ||
] | ||
}, | ||
"start": { | ||
"cmd": "./server/app" | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Dockerfile | ||
.dockerignore | ||
.gitignore | ||
.git | ||
README.md | ||
frontend.dockerfile | ||
|
||
build | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM node:alpine3.19 | ||
|
||
WORKDIR /app | ||
|
||
COPY client/package*.json ./ | ||
|
||
RUN npm install --ignore-platform | ||
|
||
COPY client/ . | ||
|
||
EXPOSE 5173 | ||
|
||
CMD [ "npm" , "run" , "dev" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,35 @@ | ||
{ | ||
"name": "client", | ||
"private": true, | ||
"version": "0.0.0", | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "tsc -b && vite build", | ||
"lint": "eslint .", | ||
"preview": "vite preview" | ||
}, | ||
"dependencies": { | ||
"@chakra-ui/react": "^2.10.3", | ||
"@emotion/react": "^11.13.3", | ||
"@emotion/styled": "^11.13.0", | ||
"@tanstack/react-query": "^5.59.15", | ||
"framer-motion": "^11.11.9", | ||
"react": "^18.3.1", | ||
"react-dom": "^18.3.1", | ||
"react-icons": "^5.3.0" | ||
}, | ||
"devDependencies": { | ||
"@eslint/js": "^9.11.1", | ||
"@types/react": "^18.3.10", | ||
"@types/react-dom": "^18.3.0", | ||
"@vitejs/plugin-react": "^4.3.2", | ||
"eslint": "^9.11.1", | ||
"eslint-plugin-react-hooks": "^5.1.0-rc.0", | ||
"eslint-plugin-react-refresh": "^0.4.12", | ||
"globals": "^15.9.0", | ||
"typescript": "^5.5.3", | ||
"typescript-eslint": "^8.7.0", | ||
"vite": "^5.4.8" | ||
} | ||
"name": "client", | ||
"private": true, | ||
"version": "0.0.0", | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vite --host", | ||
"build": "tsc -b && vite build", | ||
"lint": "eslint .", | ||
"preview": "vite preview" | ||
}, | ||
"dependencies": { | ||
"@chakra-ui/react": "^2.10.3", | ||
"@emotion/react": "^11.13.3", | ||
"@emotion/styled": "^11.13.0", | ||
"@tanstack/react-query": "^5.59.15", | ||
"framer-motion": "^11.11.9", | ||
"react": "^18.3.1", | ||
"react-dom": "^18.3.1", | ||
"react-icons": "^5.3.0" | ||
}, | ||
"devDependencies": { | ||
"@eslint/js": "^9.11.1", | ||
"@types/react": "^18.3.10", | ||
"@types/react-dom": "^18.3.0", | ||
"@vitejs/plugin-react": "^4.3.2", | ||
"eslint": "^9.11.1", | ||
"eslint-plugin-react-hooks": "^5.1.0-rc.0", | ||
"eslint-plugin-react-refresh": "^0.4.12", | ||
"globals": "^15.9.0", | ||
"typescript": "^5.5.3", | ||
"typescript-eslint": "^8.7.0", | ||
"vite": "^5.4.8" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
services: | ||
backend: | ||
container_name: go-server | ||
build: | ||
context: . | ||
dockerfile: server/server.dockerfile | ||
environment: | ||
MONGODB_URI: <db_connection_string> | ||
PORT: "5000" | ||
ENV: production | ||
ports: | ||
- "5000:5000" | ||
|
||
healthcheck: | ||
interval: 2s | ||
test: "exit 0" | ||
|
||
frontend: | ||
container_name: react-frontend | ||
build: | ||
context: . | ||
dockerfile: client/client.dockerfile | ||
|
||
ports: | ||
- "5173:5173" | ||
depends_on: | ||
backend: | ||
condition: service_healthy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
tmp | ||
backend.dockerfile | ||
.dockerignore |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# use official Golang image | ||
FROM golang:alpine3.20 | ||
|
||
# set working directory | ||
WORKDIR /app | ||
RUN mkdir dist | ||
|
||
# Copy the source code | ||
COPY server/ . | ||
COPY client/dist ./dist | ||
# Download and install the dependencies | ||
RUN go mod tidy | ||
|
||
# Build the Go app | ||
RUN go build -o todoApp . | ||
|
||
#EXPOSE the port | ||
EXPOSE 5000 | ||
|
||
# Run the executable | ||
CMD ["./todoApp"] |