Skip to content

Commit 7566344

Browse files
committed
updated essential files in vue sample
1 parent 45b7d29 commit 7566344

File tree

4 files changed

+60
-9
lines changed

4 files changed

+60
-9
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Note: universal image is not compatible with the devcontainer tools.
2+
# we use the typescript-node image instead here but should switch out per
3+
# project requirements. You can choose a devcontainer that's appropriate
4+
# for your sample from the list below #REMOVE_ME_AFTER_EDITING
5+
6+
# FROM mcr.microsoft.com/devcontainers/go:1.22-bookworm
7+
# FROM mcr.microsoft.com/devcontainers/python:3.12-bookworm
8+
# FROM mcr.microsoft.com/devcontainers/php:8.3-bookworm
9+
# FROM mcr.microsoft.com/devcontainers/ruby:3.2-bookworm
10+
# FROM mcr.microsoft.com/devcontainers/java:11-bookworm
11+
# FROM mcr.microsoft.com/devcontainers/rust:1-bookworm
12+
FROM mcr.microsoft.com/devcontainers/typescript-node:22-bookworm
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"build": {
3+
"dockerfile": "Dockerfile",
4+
"context": ".."
5+
},
6+
"features": {
7+
"ghcr.io/defanglabs/devcontainer-feature/defang-cli:1.0.4": {},
8+
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
9+
}
10+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
id-token: write
14+
15+
steps:
16+
- name: Checkout Repo
17+
uses: actions/checkout@v4
18+
19+
- name: Deploy
20+
uses: DefangLabs/[email protected]
21+
#REMOVE_ME_AFTER_EDITING - Replace the following line with the list of environment variables you want to pass to the action
22+
# or remove the lines if you don't need to pass any environment variables/secrets to the action
23+
with:
24+
config-env-vars: ENV1 ENV2
25+
env:
26+
ENV1: ${{ secrets.ENV1 }}
27+
ENV2: ${{ secrets.ENV2 }}

samples/vuejs/app/README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
# Vue.js
22

3-
[![1-click-deploy](https://defang.io/deploy-with-defang.png)](https://portal.defang.dev/)
3+
[![1-click-deploy](https://defang.io/deploy-with-defang.png)](https://portal.defang.dev/redirect?url=https%3A%2F%2Fgithub.com%2Fnew%3Ftemplate_name%3Dsample-vuejs-template%26template_owner%3DDefangSamples)
44

55
This sample shows how to get a minimal Vue.js app up and running with Defang.
66

7-
## Essential Setup Files
7+
## Prerequisites
88

9-
1. A [Dockerfile](https://docs.docker.com/develop/develop-images/dockerfile_best-practices/) to describe the basic image of your applications.
10-
2. A [docker-compose file](https://docs.defang.io/docs/concepts/compose) to define and run multi-container Docker applications.
11-
3. A [.dockerignore](https://docs.docker.com/build/building/context/#dockerignore-files) file to comply with the size limit (10MB).
9+
1. Download [Defang CLI](https://github.com/DefangLabs/defang)
10+
2. (Optional) If you are using [Defang BYOC](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html) authenticated with your AWS account
11+
3. (Optional for local development) [Docker CLI](https://docs.docker.com/engine/install/)
1212

13-
## Prerequisite
13+
## Development
1414

15-
1. Download [Defang CLI](https://github.com/DefangLabs/defang)
16-
2. If you are using [Defang BYOC](https://docs.defang.io/docs/concepts/defang-byoc), make sure you have properly [authenticated your AWS account](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html)
17-
Plus, make sure that you have properly set your environment variables like `AWS_PROFILE`, `AWS_REGION`, `AWS_ACCESS_KEY_ID`, and `AWS_SECRET_ACCESS_KEY`.
15+
To run the application locally, you can use the following command (make sure you've got `npm` and [Node.js](https://nodejs.org/en) installed):
16+
17+
```bash
18+
npm run dev
19+
```
1820

1921
## Deploying
2022

0 commit comments

Comments
 (0)