Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
5618591
regenerate package-lock files
fyliu May 7, 2025
df483ed
move .env file into repo root and use env-cmd to load it
fyliu Apr 28, 2025
e529792
remove dotenv usage
fyliu Apr 28, 2025
65843a3
use environment variables for vite client
fyliu Apr 28, 2025
396a8b7
update Dockerfiles
fyliu Apr 28, 2025
da8595a
docker ignore
fyliu May 7, 2025
abcf2f1
update npm in Dockerfiles
fyliu Apr 11, 2025
943e033
initial docker-compose dev
fyliu Apr 9, 2025
861cfd3
remove server/docker-compose.yml
fyliu Apr 23, 2025
7eb3422
use docker cache mount to reduce image size
fyliu Apr 13, 2025
8e2bed3
create database after db service is up
fyliu Apr 24, 2025
289fd0c
add db-migrate service
fyliu Apr 25, 2025
1bbdce2
make api service depend on db-migrate
fyliu Apr 25, 2025
915e4c4
update .env.sample
fyliu Apr 30, 2025
9042ae6
add sendgrid mocking service
fyliu Apr 30, 2025
7585ee4
move .env.example from server/ to root
fyliu Apr 30, 2025
02deff6
cache node-compile-cache in Docker
fyliu May 22, 2025
da1a1dc
fix Dockerfile warning
fyliu May 22, 2025
9288d63
don't mount node_modules/ from the host
fyliu May 22, 2025
5d4a29d
changes to support db-only docker config
fyliu May 23, 2025
1077624
Change sendgrid port to 7001
fyliu May 29, 2025
42838a0
Update flyway commands
fyliu May 29, 2025
5dec283
Fix flyway:migrate for testing
fyliu May 29, 2025
34e2e2b
move .env files back to server/ and client directories
fyliu Jun 11, 2025
a528a8e
add test target with minimal docker compose env files
fyliu Jun 11, 2025
0b1ae97
use dotenvx to load server env files
fyliu Jun 12, 2025
2ad435d
client docker .env file
fyliu Jun 12, 2025
9033f65
don't call dotenvx in code
fyliu Jun 12, 2025
0be5e30
choose between connecting from local or docker for sendgrid
fyliu Jun 12, 2025
211d73e
rename .env.local-db to .env.db
fyliu Jun 13, 2025
58a4aa7
remove test case
fyliu Jun 13, 2025
5c1ecc6
remove all-local case
fyliu Jun 13, 2025
a01f64b
remove unnecessary env files from compose call
fyliu Jun 13, 2025
ae793b7
rename symbols and reorder declarations
fyliu Jun 13, 2025
f667c98
server/.env needed for connecting to shared DB
fyliu Jun 13, 2025
3f38cfc
node env override not needed for local-db
fyliu Jun 13, 2025
43b7c06
rename .env files to be more specific
fyliu Jun 13, 2025
7c67e63
use .env example files and script to copy them
fyliu Jun 13, 2025
8c03ecb
mostly automate all 4 use cases
fyliu Jun 13, 2025
0bb822f
move .env.example back to server/
fyliu Jun 15, 2025
c8f93c3
revert server/.env.example
fyliu Jun 16, 2025
99ac4c0
delete and ignore all new .env files
fyliu Jun 13, 2025
d2acfa1
undo unignore .env
fyliu Jun 14, 2025
ba14dee
simplify package.json environment scripts
fyliu Jun 15, 2025
2bb33ad
add .env.example for compose
fyliu Jun 16, 2025
cd5f648
don't ignore new env directory
fyliu Jun 16, 2025
fe77059
consolidate env files in root/env/
fyliu Jun 16, 2025
3215a46
simplify start-env usage display
fyliu Jun 17, 2025
6b975dd
update docker compose calls from docker-compose
fyliu Jun 17, 2025
7928a98
uninstall dotenv and env-cmd
fyliu Jun 17, 2025
8a62375
clean up comments
fyliu Jun 17, 2025
4376fe0
remove env-cmd from client
fyliu Jun 17, 2025
24015b0
reorder root package scripts
fyliu Jun 17, 2025
d11e349
reorder env file loading
fyliu Jun 17, 2025
afd462d
rename npm script name
fyliu Jun 17, 2025
0a1b55e
revert test setup for flyway
fyliu Jun 17, 2025
93fb7fd
revert dotenv change
fyliu Jun 17, 2025
046b4fe
add email sender to sendgrid override file
fyliu Jun 19, 2025
5a80d6e
remove dotenv from client app
fyliu Jun 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Docker compose settings

# Database
DOCKER_DB_SERVER_NAME=db
DOCKER_DB_SERVER_PORT=1433
DOCKER_DB_USER_NAME=sa
DOCKER_DB_PASSWORD=Dogfood1!

# Client
CLIENT_PORT=3000
CLIENT_EXPOSED_PORT=3001

# Server
PORT=5001
7 changes: 3 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ celerybeat-schedule
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
Expand Down Expand Up @@ -245,11 +244,11 @@ node_modules

.env
# Just in case developer forgets "." at start of .env file name
env
#env
# Just in case developer forgets to rename file to .env
dotenv
dotenv

# React .env SHOULD be in repo - it has no secrets, and is
# React .env SHOULD be in repo - it has no secrets, and is
# required for GitHub action to build react app.
!/client/.env

Expand Down
1 change: 0 additions & 1 deletion client/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
**/node_modules
**/db
11 changes: 9 additions & 2 deletions client/.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
# Use to simulate different environments (DEV, UAT, PROD)
VITE_ENV=DEV
CLIENT_PORT=3000

# Use to simulate different environments (DEV, UAT, PROD)
VITE_ENV=DEV

# Don't open browser if running in CI or Docker
VITE_OPEN_BROWSER=true

VITE_API_URL=http://localhost:5001
18 changes: 13 additions & 5 deletions client/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
FROM node:alpine
WORKDIR '/app'
COPY package.json .
RUN npm install
FROM node:lts-alpine

WORKDIR /usr/app

COPY package.json package-lock.json ./

RUN --mount=type=cache,target=/root/.npm \
--mount=type=cache,target=/tmp/node-compile-cache \
npm install -g npm && \
npm install --legacy-peer-deps

COPY . .
CMD ["npm", "run", "start"]

CMD ["npm", "start"]
Loading