Skip to content
Open

Test #85

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
6e808ee
Update README.md
jakelevirne Feb 11, 2020
7d1c42a
Bump acorn from 6.4.0 to 6.4.1
dependabot[bot] Apr 5, 2020
2b1cf74
Merge pull request #2 from digitalocean-apps/dependabot/npm_and_yarn/…
jakelevirne Jul 8, 2020
1a95cf2
Bump next from 9.1.7 to 9.3.2
dependabot[bot] Jul 8, 2020
70c5319
Merge pull request #1 from digitalocean-apps/dependabot/npm_and_yarn/…
jakelevirne Jul 8, 2020
6100cfb
Update README.md
jakelevirne Jul 8, 2020
a00c0d1
updates
Jul 21, 2020
0ca5f43
add styles
Jul 28, 2020
677a6dd
stuff
Aug 20, 2020
c6d965c
Merge pull request #1 from chris-on-code/master
Sep 2, 2020
cb13b22
Create app.yaml
Sep 23, 2020
469b92f
Update .do/app.yaml
kamaln7 Sep 27, 2020
3cd616f
add deploy.template.yaml (#3)
keladhruv Oct 27, 2020
91a5424
Bump lodash from 4.17.17 to 4.17.20
dependabot[bot] Oct 30, 2020
aa51c97
Merge pull request #4 from digitalocean/dependabot/npm_and_yarn/lodas…
Oct 30, 2020
c933cc1
upgrade dependencies
Oct 30, 2020
bd9bfa7
Merge pull request #5 from digitalocean/upgrade-dependencies
Oct 30, 2020
791c800
Add Deploy to DO button
keladhruv Nov 9, 2020
b88f793
Bump ini from 1.3.5 to 1.3.8
dependabot[bot] Dec 13, 2020
f1f1aae
Merge pull request #7 from digitalocean/dependabot/npm_and_yarn/ini-1…
Dec 14, 2020
fe2f4cf
Update README.md
Jan 9, 2021
58eb5fe
Merge pull request #10 from digitalocean/readme-updates-20210109
Jan 11, 2021
635c9ab
Bump path-parse from 1.0.6 to 1.0.7 (#21)
dependabot[bot] Aug 12, 2021
3136255
Readme edits
sharmita3 Aug 17, 2021
19d31a8
Merge pull request #24 from digitalocean/readme-edts
sharmita3 Aug 17, 2021
94aad82
Bump tar from 6.0.5 to 6.1.11 (#25)
dependabot[bot] Aug 31, 2021
c73fb6c
Updates README Copy
yGabriel Mar 14, 2023
48e9a4e
Create dependabot.yaml
ElanHasson Dec 20, 2023
f995b13
Merge pull request #50 from digitalocean/ElanHasson-patch-1
ElanHasson Dec 20, 2023
e140e3f
Merge pull request #39 from yGabriel/docs/PDOCS-1641
ElanHasson Dec 20, 2023
39c77bb
Upgrade react + nextjs and friends. Fix breaking changes. (#51)
ElanHasson Dec 20, 2023
b05f788
Use serve to run app (#55)
fumblehool Jan 31, 2024
5a65fc3
Remove build_command from app and deploy template (#83)
fumblehool Sep 27, 2024
2c90b67
test branch
serenelion Jun 8, 2025
8fbfbfb
Update .gitignore to exclude sensitive files
serenelion Jun 8, 2025
3e50d7c
test branch
serenelion Jun 8, 2025
23c8296
image name
serenelion Jun 8, 2025
6abebab
Add Dockerfile and update Next.js config for production build
serenelion Jun 8, 2025
b949f7d
docker setup
serenelion Jun 8, 2025
b20528d
Update build configuration for Next.js deployment
serenelion Jun 8, 2025
5def8f2
Update dependencies and regenerate package-lock.json
serenelion Jun 8, 2025
d25a988
Update README with deployment status
serenelion Jun 8, 2025
d3f0338
Update workflow to install Docker Compose and improve deployment process
serenelion Jun 8, 2025
46b4536
Fix here-document syntax in workflow file
serenelion Jun 9, 2025
35d4af0
Update workflow with proper Docker setup and improved deployment process
serenelion Jun 9, 2025
186856f
Fix Docker image tag by converting repository name to lowercase
serenelion Jun 9, 2025
d5eabe3
Fix Docker image naming format
serenelion Jun 9, 2025
e4abe7f
Fix Docker image tag by using correct toLower function
serenelion Jun 9, 2025
c05e3b2
fix: add width and height to background image, update docker config f…
serenelion Jun 9, 2025
8cef582
github action fix
serenelion Jun 9, 2025
104930a
caps
serenelion Jun 9, 2025
0d0a9a9
test changes
serenelion Jun 9, 2025
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
8 changes: 8 additions & 0 deletions .do/app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: sample-nextjs
services:
- environment_slug: node-js
github:
branch: main
deploy_on_push: true
repo: digitalocean/sample-nextjs
name: sample-nextjs
8 changes: 8 additions & 0 deletions .do/deploy.template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
spec:
name: sample-nextjs
services:
- environment_slug: node-js
git:
branch: main
repo_clone_url: https://github.com/digitalocean/sample-nextjs.git
name: sample-nextjs
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
65 changes: 65 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
# borrowed from https://github.com/dependabot/dependabot-core/blob/main/.github/dependabot.yml

version: 2
updates:
- package-ecosystem: "bundler"
directory: "/"
schedule:
interval: "daily"
groups:
dev-dependencies:
dependency-type: "development"
update-types:
- "minor"
- "patch"
- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "daily"
groups:
dev-dependencies:
dependency-type: "development"
update-types:
- "minor"
- "patch"
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "mix"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
groups:
dev-dependencies:
dependency-type: "development"
update-types:
- "minor"
- "patch"
ignore:
- dependency-name: "npm"
update-types: ["version-update:semver-major"]
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "pub"
directory: "/"
schedule:
interval: "daily"
57 changes: 57 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: CI/CD Pipeline

on:
push:
branches: [ main, staging ]
pull_request:
branches: [ main, staging ]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/launchpad-ai

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install dependencies
run: npm install

- name: Build
run: npm run build

- name: Run tests
run: npm test

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker images
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging'
run: |
docker build -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest .
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest

- name: Deploy to Digital Ocean
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging'
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.DROPLET_HOST }}
username: ${{ secrets.DROPLET_USERNAME }}
key: ${{ secrets.DROPLET_SSH_KEY }}
script: |
cd /var/www/launchpad-ai
docker-compose pull
docker-compose up -d
39 changes: 39 additions & 0 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Production Deployment

on:
push:
branches: [ main ]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
deploy-production:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker images
run: |
docker build -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:production .
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:production

- name: Deploy to Production
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.PRODUCTION_DROPLET_HOST }}
username: ${{ secrets.PRODUCTION_DROPLET_USERNAME }}
key: ${{ secrets.PRODUCTION_DROPLET_SSH_KEY }}
script: |
cd /var/www/launchpad-ai
docker-compose pull
docker-compose up -d
39 changes: 39 additions & 0 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Staging Deployment

on:
push:
branches: [ staging ]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
deploy-staging:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker images
run: |
docker build -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:staging .
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:staging

- name: Deploy to Staging
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.STAGING_DROPLET_HOST }}
username: ${{ secrets.STAGING_DROPLET_USERNAME }}
key: ${{ secrets.STAGING_DROPLET_SSH_KEY }}
script: |
cd /var/www/launchpad-ai-staging
docker-compose pull
docker-compose up -d
84 changes: 84 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Test Deployment

on:
push:
branches: [ test ]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/${{ github.event.repository.name }}

jobs:
deploy-test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker images
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/test:latest
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Install Docker Compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/v2.20.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version

- name: Deploy to Test
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.TEST_DROPLET_HOST }}
username: ${{ secrets.TEST_DROPLET_USERNAME }}
key: ${{ secrets.TEST_DROPLET_SSH_KEY }}
script: |
# Install Docker if not present
if ! command -v docker &> /dev/null; then
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $USER
fi

# Install Docker Compose if not present
if ! command -v docker-compose &> /dev/null; then
sudo curl -L "https://github.com/docker/compose/releases/download/v2.20.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
fi

# Ensure deployment directory exists
mkdir -p /var/www/launchpad-ai-test

# Create docker-compose file
cat > /var/www/launchpad-ai-test/docker-compose.yml << EOF
version: '3.8'
services:
app:
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/test:latest
restart: always
environment:
- NODE_ENV=test
ports:
- "3000:3000"
volumes:
- /var/www/launchpad-ai-test/uploads:/app/uploads
EOF

# Deploy the application
cd /var/www/launchpad-ai-test
docker-compose pull
docker-compose up -d
27 changes: 27 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,29 @@
# Environment files
.env
.env.*
!.env.example
.github/workflows/.env
.github/workflows/.env.*

# Dependencies
node_modules/
.pnp/
.pnp.js

# Testing
coverage/

# Production
build/
dist/
out/

# Next.js
.next/
_static/
.turbo/

# Misc
.DS_Store
*.pem
.vercel
Empty file added .turbo/cookies/1.cookie
Empty file.
Empty file added .turbo/cookies/2.cookie
Empty file.
Empty file added .turbo/cookies/3.cookie
Empty file.
Loading