Skip to content

Commit

Permalink
Merge pull request #7 from biohackerellie/dev
Browse files Browse the repository at this point in the history
add custom template
  • Loading branch information
biohackerellie authored May 1, 2023
2 parents 5388dff + 8f10abe commit c09dcc2
Show file tree
Hide file tree
Showing 23 changed files with 7,711 additions and 0 deletions.
44 changes: 44 additions & 0 deletions Custom-Template/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
version: '3.9'

services:
frontend:
build:
context: ./front-end
dockerfile: Dockerfile
image: epklabs/music-app-frontend
container_name: music-app-frontend
restart: unless-stopped
ports:
- '3030:80' # change to your desired port on the left side of the colon. Do not touch the right side
depends_on:
- server
networks:
- mynetwork
environment:
- VITE_API_URL
- VITE_HOME_TITLE
- VITE_SPOTIFY_LINK
- VITE_APPLE_LINK
- VITE_AMAZON_LINK
- VITE_YOUTUBE_LINK
- VITE_SOUNDCLOUD_LINK

server:
build:
context: ./server
dockerfile: Dockerfile
image: epklabs/music-app-server
container_name: music-app-server
restart: unless-stopped
ports:
- '3001:3001' # change to your desired port on the left side of the colon. Do not touch the right side
volumes:
- /path/to/images:/app/public # change to your desired path on the left side of the colon. It must be in a folder called Images. Do not touch the right side
- /path/to/music:/app/public # change to your desired path on the left side of the colon. It must be in a folder called Music. Do not touch the right side
networks:
- mynetwork
environment:
- SITE_URL

networks:
mynetwork:
15 changes: 15 additions & 0 deletions Custom-Template/front-end/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
],
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
settings: { react: { version: '18.2' } },
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': 'warn',
},
}
28 changes: 28 additions & 0 deletions Custom-Template/front-end/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
.env.dev*
vite.config.ts
src/redux/store.js
```
29 changes: 29 additions & 0 deletions Custom-Template/front-end/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Use the official Node.js image as the base image
FROM node:lts

# Set the working directory
WORKDIR /app

# Copy package.json and package-lock.json to the working directory
COPY package*.json ./

# Install dependencies
RUN npm install

# Copy the rest of the application code
COPY . .

# Build the frontend for production
RUN npm run build

# Use the official Nginx image to serve the built frontend
FROM nginx:stable-alpine

# Copy the built frontend files to the Nginx html folder
COPY --from=0 /app/dist /usr/share/nginx/html

# Expose port 80 for Nginx
EXPOSE 80

# Start Nginx
CMD ["nginx", "-g", "daemon off;"]
13 changes: 13 additions & 0 deletions Custom-Template/front-end/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Ellie Kerns Music</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>
Loading

0 comments on commit c09dcc2

Please sign in to comment.