-
Notifications
You must be signed in to change notification settings - Fork 30
Create install.sh script
#119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
2f7a103
f0d9789
8940ca0
fc2ca20
51f9238
38fc814
32e3f9b
e9d262e
5181c5f
fe067ac
1e9a000
e0b7bd5
ca858ad
f2955bd
32009ec
97c3ffb
acc8327
4035540
e550ea6
be2ca79
174af9e
434d6ba
4917f61
a47284b
c0168d1
1773cf8
03553cd
dc42a99
5c15d5d
fa87b32
4cad4c7
4c2ca22
7921196
6cc99b8
add55e3
2feb6f7
a30dcb5
9ddd38f
0adb8ed
a144c41
1408e79
87796f2
59c7f59
74c7c9c
907f171
fb9d9fa
b1e12ff
94a9f10
5c206ee
4fdfe3e
661dacb
783c6fd
cc10b73
c480654
fd55517
6cd940b
df615ea
5d3a4f7
a7d459c
2100eb9
f828cdb
9a4fc1d
553c013
a65ab0b
5ec5764
712467f
6750e1c
dccb70b
26ebc1f
e581b92
b23a5ad
5344a7b
d83e3c9
3931590
96ac72f
7aa5159
5fa1536
75b462c
94513a0
4a665e0
9e7b7b8
4e8a722
fc3ed3a
02ac09f
b951095
3a84f5b
2bce55a
fc9dd76
8cf9f5a
b9e5941
f698509
c18e59e
47b2a83
36720e7
1107d92
1d81403
66e0d91
468432b
4da520b
163681e
e362604
bddeaba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| name: Build Deployment Zip | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Create deployment ZIP | ||
| run: | | ||
| zip -r deploy_bundle.zip \ | ||
| install/ \ | ||
|
|
||
| - name: Release | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| files: deploy_bundle.zip | ||
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -101,3 +101,69 @@ sudo chown -R $(whoami): ${APP_NAME} | |||
| ``` | ||||
|
|
||||
| From here on you can follow the steps on the [Getting Started](https://docs.decidim.org/en/install/) guide. | ||||
|
|
||||
| ## Using a production deploy script | ||||
|
|
||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
| We've been working on a script that you can use to have a fully functional, production-ready decidim instance. | ||||
|
|
||||
| ```bash | ||||
| curl -fsSL https://decidim.org/install | bash | ||||
| ``` | ||||
|
|
||||
| It will install the necessary tools to make decidim work on your server. | ||||
|
|
||||
| - Docker | ||||
| - unzip | ||||
| - UFW | ||||
|
|
||||
| The application will be hosted in the `/opt/decidim` directory by default, even though you can change it with `REPOSITORY_PATH` environment variable. | ||||
|
|
||||
| ## App - Main Decidim Web Application | ||||
| The app itself will be the container with the base image you decide (By default is the latest Decidim version: `decidim/decidim:latest`). You can change it with the `DECIDIM_IMAGE` environment variable. | ||||
|
|
||||
| This is the front-end web process users access in the browser. | ||||
|
|
||||
| ## Worker | ||||
| The worker will be the one responsible for all the background jobs that the application needs to run. | ||||
|
|
||||
| ## Cache | ||||
| The app needs a cache server. This will be a `redis:8-alpine` instance. This cache will be used both by the app and the worker. | ||||
|
|
||||
| ## Database | ||||
|
|
||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
| The application needs a database to run. Through the installation process you will be asked if you have an already working database, if not, you will have a postgres container with all the schema and migrations run (It will be a `postgres:17-alpine`) | ||||
|
|
||||
| ## Configuration | ||||
|
|
||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
| To configure the application you will have to answer some questions that will, at the end, generate a `.env` file. | ||||
|
|
||||
| ### Environment Variables Reference | ||||
|
|
||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
| To see the full list of Decidim Environment Variables, and that you can add to your generated `.env` file, you can take a look at the official [documentation](https://docs.decidim.org/en/develop/configure/environment_variables) | ||||
|
|
||||
| | Variable | Default | Used In | Description | | ||||
| |----------|---------|---------|-------------| | ||||
| | **BUNDLE_GEMFILE** | `Gemfile.wrapper` | app, worker | Selects which Gemfile the container should use. | | ||||
| | **DECIDIM_IMAGE** | `decidim/decidim:latest` | app, worker | Overrides the Decidim Docker image version. | | ||||
| | **DECIDIM_DOMAIN** | — | app, traefik | Domain for HTTPS routing and URL generation. | | ||||
| | **SECRET_KEY_BASE** | — | app, worker | Rails secret key used for sessions and cookies. | | ||||
| | **DATABASE_NAME** | `decidim` | db | PostgreSQL database name. | | ||||
| | **DATABASE_USER** | `decidim` | db | PostgreSQL username. | | ||||
| | **DATABASE_HOST** | `db` | app, worker | Hostname of your PostgreSQL instance. | | ||||
| | **DATABASE_PASSWORD** | `decidim` | db | PostgreSQL user password. | | ||||
| | **DATABASE_URL** | — | app, worker | Full PostgreSQL connection URL (overrides other DB vars). | | ||||
| | **SMTP_USERNAME** | — | app, worker | Username for SMTP authentication. | | ||||
| | **SMTP_PASSWORD** | — | app, worker | Password for SMTP authentication. | | ||||
| | **SMTP_ADDRESS** | — | app, worker | SMTP server hostname. | | ||||
| | **SMTP_DOMAIN** | — | app, worker | SMTP domain. | | ||||
| | **SMTP_PORT** | — | app, worker | SMTP port. | | ||||
| | **SMTP_STARTTLS_AUTO** | `true` | app | Enables STARTTLS automatically. | | ||||
| | **REDIS_URL** | `redis://decidim_cache:6379/0` | app | Redis URL for cache + sessions. | | ||||
| | **VAPID_PUBLIC_KEY** | — | app | Web Push public key for browser notifications. | | ||||
| | **VAPID_PRIVATE_KEY** | — | app | Web Push private key (keep secret). | | ||||
| | **CERTIFICATE_EMAIL** | — | traefik | Email used by Let's Encrypt for certificate issues/renewals. | | ||||
| | **WEB_CONCURRENCY** | `2` | app | Puma concurrency setting. | | ||||
| | **LOG_LEVEL** | `info` | app | Log level for Rails. | | ||||
| | **DECIDIM_FORCE_SSL** | `false` | app | Enforce HTTPS-only traffic. | | ||||
| | **MAPS_API_KEY** | — | app | API key for maps provider. | | ||||
| | **MAPS_PROVIDER** | `here` | app | Selects map provider (here, mapbox, google, etc). | | ||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: decidim/docker
Length of output: 172
🌐 Web query:
softprops/action-gh-release requirements tag ref behavior💡 Result:
Summary of softprops/action-gh-release tag/ref behavior and requirements
Sources:
[1] softprops/action-gh-release README (usage, tag_name default and tag-gating).
[2] softprops/action-gh-release GitHub issue reporting failures when using non-existing tag_name (example "latest").
🏁 Script executed:
Repository: decidim/docker
Length of output: 132
Release step will fail on branch pushes without proper tag handling.
softprops/action-gh-releasedefaultstag_nametogithub.refand requires an actual tag ref. Since this workflow triggers onpush: branches: [main], the release step at lines 21-24 will fail with a failed release API call when invoked on branch pushes. Gate the release step withif: startsWith(github.ref, 'refs/tags/')or restrict the trigger to tag pushes only (e.g.,on: push: tags: ['v*']).🔧 Proposed fix (tag-only release)
Or add a conditional gate to the release step:
- name: Release + if: startsWith(github.ref, 'refs/tags/') uses: softprops/action-gh-release@v2🤖 Prompt for AI Agents