Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enabled devcontainers #358

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
31 changes: 31 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#BUILDER
FROM node:19-alpine as builder

#Make the builder directory
WORKDIR /website_fosscu

#COPY build source from project
COPY package*.json .
COPY yarn.lock .

#Copy all files into container
COPY . .

#Installing all dependencies
RUN yarn install


#MAIN
FROM node:19-alpine as main

#Make main app directory
WORKDIR /app

#Copy all from builder stage
COPY --from=builder /website_fosscu/. ./

# Run the production build
RUN yarn build

# Start the server
CMD ["yarn", "start"]
23 changes: 23 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "website-fosscu",
"dockerFile": "Dockerfile",
"context": "..",
"remoteUser": "node",
"forwardPorts": [8080],
"postCreateCommand": "yarn",
"shutdownAction": "none",
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.shell.linux": "/bin/bash",
"editor.formatOnSave": true,
"eslint.alwaysShowStatus": true
},
"extensions": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"ms-azuretools.vscode-docker"
]
}
}
}
3 changes: 3 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@ export default defineConfig({
},
define: {
'process.env': process.env
},
server: {
port: 8080, // Set the desired port here
}
});