Skip to content

Commit

Permalink
Initialize project with remix.init script
Browse files Browse the repository at this point in the history
  • Loading branch information
adamlevoy committed Jan 28, 2024
1 parent 9aa0bd6 commit de14bdf
Show file tree
Hide file tree
Showing 17 changed files with 16,624 additions and 526 deletions.
41 changes: 0 additions & 41 deletions .github/ISSUE_TEMPLATE/bug_report.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/ISSUE_TEMPLATE/config.yml

This file was deleted.

14 changes: 0 additions & 14 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

6 changes: 0 additions & 6 deletions .github/dependabot.yml

This file was deleted.

46 changes: 0 additions & 46 deletions .github/workflows/format-repo.yml

This file was deleted.

33 changes: 0 additions & 33 deletions .github/workflows/lint-repo.yml

This file was deleted.

34 changes: 0 additions & 34 deletions .github/workflows/no-response.yml

This file was deleted.

8 changes: 0 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
# We don't want lockfiles in stacks, as people could use a different package manager
# This part will be removed by `remix.init`
bun.lockb
package-lock.json
pnpm-lock.yaml
pnpm-lock.yml
yarn.lock

node_modules

/build
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ FROM base as deps

WORKDIR /myapp

ADD package.json .npmrc ./
ADD package.json package-lock.json .npmrc ./
RUN npm install --include=dev

# Setup production node_modules
Expand All @@ -21,7 +21,7 @@ FROM base as production-deps
WORKDIR /myapp

COPY --from=deps /myapp/node_modules /myapp/node_modules
ADD package.json .npmrc ./
ADD package.json package-lock.json .npmrc ./
RUN npm prune --omit=dev

# Build the app
Expand Down
22 changes: 0 additions & 22 deletions LICENSE.md

This file was deleted.

21 changes: 6 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,6 @@ Click this button to create a [Gitpod](https://gitpod.io) workspace with the pro

## Development

- First run this stack's `remix.init` script and commit the changes it makes to your project.

```sh
npx remix init
git init # if you haven't already
git add .
git commit -m "Initialize project"
```

- Initial setup:

```sh
Expand Down Expand Up @@ -89,8 +80,8 @@ Prior to your first deployment, you'll need to do a few things:
- Create two apps on Fly, one for staging and one for production:

```sh
fly apps create indie-stack-template
fly apps create indie-stack-template-staging
fly apps create remix-indie-7872
fly apps create remix-indie-7872-staging
```

> **Note:** Make sure this name matches the `app` set in your `fly.toml` file. Otherwise, you will not be able to deploy.
Expand All @@ -112,17 +103,17 @@ Prior to your first deployment, you'll need to do a few things:
- Add a `SESSION_SECRET` to your fly app secrets, to do this you can run the following commands:

```sh
fly secrets set SESSION_SECRET=$(openssl rand -hex 32) --app indie-stack-template
fly secrets set SESSION_SECRET=$(openssl rand -hex 32) --app indie-stack-template-staging
fly secrets set SESSION_SECRET=$(openssl rand -hex 32) --app remix-indie-7872
fly secrets set SESSION_SECRET=$(openssl rand -hex 32) --app remix-indie-7872-staging
```

If you don't have openssl installed, you can also use [1Password](https://1password.com/password-generator) to generate a random secret, just replace `$(openssl rand -hex 32)` with the generated secret.

- Create a persistent volume for the sqlite database for both your staging and production environments. Run the following:

```sh
fly volumes create data --size 1 --app indie-stack-template
fly volumes create data --size 1 --app indie-stack-template-staging
fly volumes create data --size 1 --app remix-indie-7872
fly volumes create data --size 1 --app remix-indie-7872-staging
```

Now that everything is set up you can commit and push your changes to your repo. Every commit to your `main` branch will trigger a deployment to your production environment, and every commit to your `dev` branch will trigger a deployment to your staging environment.
Expand Down
65 changes: 32 additions & 33 deletions fly.toml
Original file line number Diff line number Diff line change
@@ -1,51 +1,50 @@
app = "indie-stack-template"

app = "remix-indie-7872"
kill_signal = "SIGINT"
kill_timeout = 5
processes = []
processes = [ ]

[experimental]
allowed_public_ports = []
auto_rollback = true
cmd = "start.sh"
entrypoint = "sh"
allowed_public_ports = [ ]
auto_rollback = true
cmd = "start.sh"
entrypoint = "sh"

[mounts]
source = "data"
destination = "/data"
source = "data"
destination = "/data"

[[services]]
internal_port = 8080
processes = ["app"]
protocol = "tcp"
script_checks = []
internal_port = 8_080
processes = [ "app" ]
protocol = "tcp"
script_checks = [ ]

[services.concurrency]
hard_limit = 25
soft_limit = 20
type = "connections"
hard_limit = 25
soft_limit = 20
type = "connections"

[[services.ports]]
handlers = ["http"]
port = 80
force_https = true
handlers = [ "http" ]
port = 80
force_https = true

[[services.ports]]
handlers = ["tls", "http"]
port = 443
handlers = [ "tls", "http" ]
port = 443

[[services.tcp_checks]]
grace_period = "1s"
interval = "15s"
restart_limit = 0
timeout = "2s"
grace_period = "1s"
interval = "15s"
restart_limit = 0
timeout = "2s"

[[services.http_checks]]
interval = "10s"
grace_period = "5s"
method = "get"
path = "/healthcheck"
protocol = "http"
timeout = "2s"
tls_skip_verify = false
[services.http_checks.headers]
interval = "10s"
grace_period = "5s"
method = "get"
path = "/healthcheck"
protocol = "http"
timeout = "2s"
tls_skip_verify = false
headers = { }

0 comments on commit de14bdf

Please sign in to comment.