-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhance Docker setup and environment configuration
- Add dotenv support for environment variable management in backend - Update docker-compose.yml to include .env file for backend service - Modify frontend Dockerfile to copy nginx configuration - Add new npm scripts for building and starting frontend in Docker - Create GitHub Actions workflow for Docker Compose build - Introduce nginx configuration for serving frontend application - Initialize package.json for the project with basic scripts and metadata
- Loading branch information
1 parent
2cd971a
commit 0d9f847
Showing
7 changed files
with
48 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Compose | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: docker compose build |
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 |
---|---|---|
@@ -1,19 +1,14 @@ | ||
FROM node:20 as build | ||
|
||
WORKDIR /frontend | ||
|
||
COPY package.json package-lock.json ./ | ||
|
||
RUN npm install | ||
|
||
COPY . . | ||
|
||
RUN npm run build --prod | ||
|
||
FROM nginx:alpine | ||
|
||
COPY nginx.conf /etc/nginx/conf.d/default.conf | ||
COPY --from=build frontend/dist/github-value/browser /usr/share/nginx/html | ||
|
||
EXPOSE 80 | ||
|
||
CMD ["nginx", "-g", "daemon off;"] |
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 @@ | ||
server { | ||
listen 80; | ||
server_name your_domain_or_ip; | ||
|
||
root /usr/share/nginx/html; | ||
index index.html; | ||
|
||
location / { | ||
try_files $uri $uri/ /index.html; | ||
} | ||
|
||
error_page 404 /index.html; | ||
} |
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,12 @@ | ||
{ | ||
"name": "github-value", | ||
"version": "1.0.0", | ||
"description": "Welcome to My Fullstack App! 🎉 This project is a full-stack application built with Angular for the frontend and Node.js for the backend, all written in TypeScript. It uses SQLite as the database and is containerized using Docker Compose. 🐳", | ||
"main": "index.js", | ||
"scripts": { | ||
"dev-frontend": "cd ./frontend && npm run start", | ||
"dev-backend": "cd ./backend && npm run start" | ||
}, | ||
"author": "", | ||
"license": "ISC" | ||
} |