Scaffold frontend with Docker Compose support
This commit is contained in:
parent
baeab3b6e3
commit
75da30b168
4 changed files with 34 additions and 0 deletions
13
docker-compose.yml
Normal file → Executable file
13
docker-compose.yml
Normal file → Executable file
|
|
@ -26,5 +26,18 @@ services:
|
|||
env_file:
|
||||
- .env
|
||||
|
||||
frontend:
|
||||
build: ./frontend
|
||||
volumes:
|
||||
- ./frontend:/app
|
||||
- /app/node_modules
|
||||
- /app/.next
|
||||
ports:
|
||||
- "3000:3000"
|
||||
environment:
|
||||
API_URL: http://web:8000
|
||||
depends_on:
|
||||
- web
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
|
|
|
|||
2
frontend/.env.local
Executable file
2
frontend/.env.local
Executable file
|
|
@ -0,0 +1,2 @@
|
|||
# API_URL is set via docker-compose environment for Docker
|
||||
# and defaults to http://localhost:8000 in next.config.ts for local dev
|
||||
12
frontend/Dockerfile
Executable file
12
frontend/Dockerfile
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
FROM node:22-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json package-lock.json* ./
|
||||
RUN npm ci
|
||||
|
||||
COPY . .
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["npm", "run", "dev"]
|
||||
7
frontend/postcss.config.mjs
Executable file
7
frontend/postcss.config.mjs
Executable file
|
|
@ -0,0 +1,7 @@
|
|||
const config = {
|
||||
plugins: {
|
||||
"@tailwindcss/postcss": {},
|
||||
},
|
||||
};
|
||||
|
||||
export default config;
|
||||
Loading…
Add table
Add a link
Reference in a new issue