This repository was archived by the owner on Feb 18, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: migrate backend/ and frontend/ to services/ (#20)
- Loading branch information
Showing
124 changed files
with
97 additions
and
1,431 deletions.
There are no files selected for viewing
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
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
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 |
---|---|---|
|
@@ -6,4 +6,4 @@ temp/ | |
.DS_Store | ||
*.pem | ||
.env | ||
nshm.passphrase | ||
*.passphrase |
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 |
---|---|---|
@@ -1,43 +1,43 @@ | ||
services: | ||
frontend: | ||
web: | ||
build: | ||
context: frontend | ||
dockerfile: Dockerfile | ||
args: | ||
NEXT_PUBLIC_API_BASE_URL: ${NEXT_PUBLIC_API_BASE_URL} | ||
context: services/web | ||
dockerfile: Dockerfile.dev | ||
ports: | ||
- "80:3000" | ||
restart: always | ||
- 3000:3000 | ||
environment: | ||
- NEXT_PUBLIC_API_BASE_URL=${NEXT_PUBLIC_API_BASE_URL} | ||
- API_BASE_URL=${API_BASE_URL} | ||
user: root | ||
volumes: | ||
- ./services/web:/app | ||
- /app/node_modules | ||
restart: always | ||
|
||
backend: | ||
account: | ||
build: | ||
context: backend | ||
context: services/account | ||
dockerfile: Dockerfile | ||
ports: | ||
- "8081:8081" | ||
restart: always | ||
- 8081:8081 | ||
environment: | ||
- POSTGRES_URL=${POSTGRES_URL} | ||
- POSTGRES_USERNAME=${POSTGRES_USERNAME} | ||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD} | ||
restart: always | ||
depends_on: | ||
- postgres | ||
|
||
postgres: | ||
image: postgres:latest | ||
user: root | ||
image: postgres | ||
ports: | ||
- "5432:5432" | ||
- 5432:5432 | ||
environment: | ||
- POSTGRES_USER=${POSTGRES_USERNAME} | ||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD} | ||
- POSTGRES_DB=${POSTGRES_DB} | ||
volumes: | ||
- pgdata:/var/lib/postgresql/data | ||
- ./init:/docker-entrypoint-initdb.d | ||
- ./services/account/database:/docker-entrypoint-initdb.d | ||
|
||
volumes: | ||
pgdata: |
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 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# How user browser accesses API. | ||
# For example, "https://nshm.mrcai.dev/api", | ||
# Note: Do not include a trailing slash. | ||
NEXT_PUBLIC_API_BASE_URL= | ||
|
||
# How web service accesses other services. | ||
# For example, "http://service-registry:8761". | ||
# Note: Do not include a trailing slash. | ||
API_BASE_URL= |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
.next/ | ||
coverage/ | ||
node_modules/ | ||
.env* | ||
!.env.example | ||
next-env.d.ts | ||
*.tsbuildinfo |
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 @@ | ||
# docker build -f Dockerfile.dev -t web:dev . | ||
# docker run -d -p 3000:3000 --name web --env-file .env -v .:/app -v /app/node_modules web:dev | ||
|
||
FROM node:lts-alpine | ||
|
||
WORKDIR /app | ||
|
||
RUN apk add --no-cache libc6-compat | ||
|
||
RUN corepack enable pnpm | ||
|
||
COPY package.json pnpm-lock.yaml ./ | ||
|
||
RUN pnpm install --frozen-lockfile | ||
|
||
ENV HOSTNAME=0.0.0.0 | ||
ENV PORT=3000 | ||
|
||
EXPOSE 3000 | ||
|
||
CMD ["pnpm", "run", "dev"] |
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
terraform.tfstate* | ||
terraform/.terraform | ||
.terraform/ | ||
*.tfstate* |
Oops, something went wrong.