Skip to content

Commit

Permalink
Merge pull request #4 from AndrewHUNGNguyen/master
Browse files Browse the repository at this point in the history
DockerFile changes for fly deployment of quill
  • Loading branch information
gregv authored Jul 20, 2024
2 parents 000616a + d3705fc commit 21d416f
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 1 deletion.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ node_modules/
app/client/build/
app/client/plugins/
*.log
**/.env*
18 changes: 18 additions & 0 deletions .github/workflows/fly-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# See https://fly.io/docs/app-guides/continuous-deployment-with-github-actions/

name: Fly Deploy
on:
push:
branches:
- main
jobs:
deploy:
name: Deploy app
runs-on: ubuntu-latest
concurrency: deploy-group # optional: ensure only one action runs at a time
steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
FROM node:10.17.0-buster-slim

# Install Python 2
RUN apt-get update && apt-get install -y python2

# Install make and build-essential
RUN apt-get update && apt-get install -y make build-essential

WORKDIR /usr/app/src
EXPOSE 3000

Expand Down
5 changes: 4 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ var adminConfig = require("./config/admin");
var app = express();

// Connect to mongodb
mongoose.connect(database);
mongoose.connect(database, {
useNewUrlParser: true,
useUnifiedTopology: true
});

app.use(morgan("dev"));

Expand Down
22 changes: 22 additions & 0 deletions fly.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# fly.toml app configuration file generated for quill on 2024-07-20T01:18:12-07:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#

app = 'quill'
primary_region = 'sjc'

[build]

[http_service]
internal_port = 3000
force_https = true
auto_stop_machines = true
auto_start_machines = true
min_machines_running = 0
processes = ['app']

[[vm]]
memory = '1gb'
cpu_kind = 'shared'
cpus = 1

0 comments on commit 21d416f

Please sign in to comment.