Skip to content

Commit fae4e6d

Browse files
committed
updates
1 parent 09bbae4 commit fae4e6d

File tree

102 files changed

+10375
-13808
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+10375
-13808
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
__pycache__
22
env
3-
htmlcov
43
.coverage
4+
htmlcov
5+
coverage
56
node_modules

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
# Deploying a Flask and React Microservice to AWS ECS
2-
3-
https://testdriven.io/courses/aws-flask-react/

buildspec.yml

Lines changed: 0 additions & 56 deletions
This file was deleted.

docker-compose.prod.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

docker-compose.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
version: '3.8'
2-
31
services:
42

53
api:
64
build:
7-
context: ./services/users
5+
context: ./services/users # updated
86
dockerfile: Dockerfile
97
entrypoint: ['/usr/src/app/entrypoint.sh']
108
volumes:
11-
- './services/users:/usr/src/app'
9+
- './services/users:/usr/src/app' # updated
1210
ports:
1311
- 5004:5000
1412
environment:
@@ -22,7 +20,7 @@ services:
2220

2321
api-db:
2422
build:
25-
context: ./services/users/src/db
23+
context: ./services/users/src/db # updated
2624
dockerfile: Dockerfile
2725
expose:
2826
- 5432
@@ -39,9 +37,9 @@ services:
3937
- './services/client:/usr/src/app'
4038
- '/usr/src/app/node_modules'
4139
ports:
42-
- 3007:3000
40+
- 3007:5173
4341
environment:
4442
- NODE_ENV=development
45-
- REACT_APP_API_SERVICE_URL=${REACT_APP_API_SERVICE_URL}
43+
- VITE_API_SERVICE_URL=${VITE_API_SERVICE_URL}
4644
depends_on:
4745
- api

services/client/.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
VITE_API_SERVICE_URL=http://localhost:5004

services/client/.eslintrc.cjs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
module.exports = {
2+
root: true,
3+
env: { browser: true, es2020: true },
4+
extends: [
5+
'eslint:recommended',
6+
'plugin:@typescript-eslint/recommended',
7+
'plugin:react-hooks/recommended',
8+
'plugin:react/recommended' // Add React rules
9+
],
10+
ignorePatterns: ['dist', '.eslintrc.cjs'],
11+
parser: '@typescript-eslint/parser',
12+
plugins: ['react-refresh', 'react'], // Add React plugin
13+
rules: {
14+
'react-refresh/only-export-components': [
15+
'warn',
16+
{ allowConstantExport: true },
17+
],
18+
'react/jsx-no-bind': ['error', {
19+
'allowArrowFunctions': true,
20+
'allowBind': false,
21+
'ignoreRefs': true
22+
}],
23+
},
24+
settings: {
25+
react: {
26+
version: '18.0',
27+
},
28+
},
29+
};

services/client/.eslintrc.json

Lines changed: 0 additions & 38 deletions
This file was deleted.

services/client/.gitignore

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
1-
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2-
3-
# dependencies
4-
/node_modules
5-
/.pnp
6-
.pnp.js
7-
8-
# testing
9-
/coverage
10-
11-
# production
12-
/build
13-
14-
# misc
15-
.DS_Store
16-
.env.local
17-
.env.development.local
18-
.env.test.local
19-
.env.production.local
20-
1+
# Logs
2+
logs
3+
*.log
214
npm-debug.log*
225
yarn-debug.log*
236
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

services/client/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# pull official base image
2-
FROM node:19
2+
FROM node:20.16.0
33

44
# set working directory
55
WORKDIR /usr/src/app
@@ -11,7 +11,6 @@ ENV PATH /usr/src/app/node_modules/.bin:$PATH
1111
COPY package.json .
1212
COPY package-lock.json .
1313
RUN npm ci
14-
RUN npm install [email protected] -g --silent
1514

1615
# start app
17-
CMD ["npm", "start"]
16+
CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0"]

0 commit comments

Comments
 (0)