Free Open-Source participatory democracy, citizen participation and open government for cities and organizations
This is the open-source repository for decidim-getxo, based on Decidim.
This is the instance for Zeugaz Getxo https://zeugaz.getxo.eus
Docker & Docker Compose is needed, then clone this repository:
git clone https://github.com/GetxoUdala/decidim-getxoor update:
cd decidim-getxo
git pullEnsure the .env file has these values defined:
DATABASE_URL=postgres://xxxxx:xxxxx@db/xxxxx
POSTGRES_USER=XXXXXX
POSTGRES_PASSWORD=XXXXXX
POSTGRES_DB=XXXXXX
SECRET_KEY_BASE=XXXXXX
CENSUS_URL=xxxxxxx
MAPS_PROVIDER=here
MAPS_API_KEY=XXXXXX
EMAIL=XXXXXX
SMTP_USERNAME=XXXXXX
SMTP_PASSWORD=XXXXXX
SMTP_ADDRESS=XXXXXX
SMTP_DOMAIN=XXXXXX
SMTP_PORT=XXXXXX
DECIDIM_ENV=productionThis application uses Traefik to handle the certificates, ensure that the following files are available:
certs/cert.crtcerts/cert.key
This instance uses Docker Compose to deploy the application into the port 3015.
First, you need to make sure you are logged into the Github Docker registry (ghcr.io).
- Go to your personal Github account, into tokens settings https://github.com/settings/tokens
- Generate a new token (Classic)
- Ensure you check the permission "read:packages" and "No expiration".
- In the server, login into docker, introduce your username and the token generated:
docker login ghcr.io --username github-username- You should stay logged permanently, you should not need to repeat this process.
To re-deploy the image this should suffice:
docker compose up -d
This instance uses Docker Compose to deploy the application with Traefik as a proxy.
If you want to locally build the docker image, change the line
image: ghcr.io/getxoudala/decidim-getxo:${GIT_REF:-main}forimage: decidim_${DECIDIM_ENV:-production}first!
You need to build and tag the image:
- Ensure you have the ENV value
DECIDIM_ENV=stagingorDECIDIM_ENV=production - Run:
./build.sh - Deploy:
docker compose up -d
Database is backup every day using https://github.com/tiredofit/docker-db-backup (see docker-compose.yml for details)
Backups are stored in:
backups/*
You will need to do some steps before having the app working properly once you've deployed it:
- Open a Rails console in the server:
bundle exec rails console - Create a System Admin user:
user = Decidim::System::Admin.new(email: <email>, password: <password>, password_confirmation: <password>)
user.save!- Visit
<your app url>/systemand login with your system admin credentials - Create a new organization. Check the locales you want to use for that organization, and select a default locale.
- Set the correct default host for the organization, otherwise the app will not work properly. Note that you need to include any subdomain you might be using.
- Fill the rest of the form and submit it.
You're good to go!