Skip to content

Commit

Permalink
Merge 48b7e6caea73f1f21ee68aaee5cf49df4dfb5fd3 into d72e12c2ddad8d537…
Browse files Browse the repository at this point in the history
…5da007e713422dcae7fab5b
  • Loading branch information
Chrisyhjiang authored Jun 14, 2024
2 parents 4904848 + ba3db58 commit 623b9f2
Show file tree
Hide file tree
Showing 14 changed files with 37 additions and 4 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: deploy

on:
push:
branches:
- main
- pr-test/*

concurrency:
group: deploy
cancel-in-progress: false

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
id-token: write

steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Install defang
run: . <(curl -Ls https://s.defang.io/install)

- name: Login to Defang
run: defang login

- name: Deploy
run: defang compose up -v --detach
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@
This template is a boilerplate project developed using Next.js, offering a starting point to help you quickly build your website. We have prepared all the necessary files for deployment. By spending just a few minutes setting up the environment, as detailed in the prerequisites, and executing the commands in our step-by-step guide, your website will be ready to go live in no time!

## Essential Setup Files

1. A [Dockerfile](https://docs.docker.com/develop/develop-images/dockerfile_best-practices/) to describe the basic image of your applications.
2. A [docker-compose file](https://docs.defang.io/docs/concepts/compose) to define and run multi-container Docker applications.
3. A [.dockerignore](https://docs.docker.com/build/building/context/#dockerignore-files) file to comply with the size limit (10MB).

## Prerequisite

1. Download [Defang CLI](https://github.com/DefangLabs/defang)
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)
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`.
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`.

## A Step-by-Step Guide

1. Open the terminal and type `defang login`
2. Type `defang compose up` in the CLI
3. Now your application will be launched
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: nextjs-boilerplate
services:
service1:
app:
build:
context: .
context: ./app
dockerfile: Dockerfile
ports:
- mode: ingress
target: 3000
target: 3000

0 comments on commit 623b9f2

Please sign in to comment.