trying to update discourse but its failing on this command
I, [2024-10-01T23:08:46.462452 #1] INFO -- : > apt-get install -y php7.4 php7.4-curl php7.4-fpm php7.4-mbstring
E: Package 'php7.4' has no installation candidate
E: Unable to locate package php7.4-curl
E: Couldn't find any package by glob 'php7.4-curl'
E: Couldn't find any package by regex 'php7.4-curl'
E: Package 'php7.4-fpm' has no installation candidate
E: Unable to locate package php7.4-mbstring
E: Couldn't find any package by glob 'php7.4-mbstring'
E: Couldn't find any package by regex 'php7.4-mbstring'
I, [2024-10-01T23:08:47.335246 #1] INFO -- : Reading package lists...
Building dependency tree...
Reading state information...
Package php7.4 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
Package php7.4-fpm is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
FAILED
--------------------
Pups::ExecError: apt-get install -y php7.4 php7.4-curl php7.4-fpm php7.4-mbstring failed with return #<Process::Status: pid 2912 exit 100>
Location of failure: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in spawn'
exec failed with the params "apt-get install -y php7.4 php7.4-curl php7.4-fpm php7.4-mbstring"
bootstrap failed with exit code 100
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.
d87ce61f0dbfc527ede7d3c09e222eff42934608174066401b2317d05193786b
root@htd-9-feb-22-live:/var/discourse#
Discourse is installed using internal NGINX.
So I am trying to update discourse which is 2 years old. from 3.2 to 3.4 i think.
So I ran below commands
1465 cd /var/discourse
1466 git pull
1467 ./launcher bootstrap web_only && ./launcher destroy web_only && ./launcher start web_only
YAML file looks like below, i have removed personal info:
# IMPORTANT: SET A SECRET PASSWORD in Postgres for the Discourse User
# TODO: change SOME_SECRET in this template
templates:
- "templates/web.template.yml"
#- "templates/web.ratelimited.template.yml"
- "shared/web-only/amp/web.amp.template.yml"
#- "shared/web_only/amp/templates/web.amp.template.yml"
## Uncomment these two lines if you wish to add Lets Encrypt (https)
- "templates/web.ssl.template.yml"
- "templates/web.letsencrypt.ssl.template.yml"
## which TCP/IP ports should this container expose?
## If you want Discourse to share a port with another webserver like Apache or nginx,
## see https://meta.discourse.org/t/17247 for details
expose:
- "80:80" # http
- "443:443" # https
# Use 'links' key to link containers together, aka use Docker --link flag.
links:
- link:
name: data
alias: data
# any extra arguments for Docker?
# docker_args:
params:
## Which Git revision should this container use? (default: tests-passed)
#version: tests-passed
env:
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
LANGUAGE: en_US.UTF-8
#EMBER_CLI_PROD_ASSETS: 1
# DISCOURSE_DEFAULT_LOCALE: en
#Global rate limits disabling rate limits to let SEO fix penalty crawling to get rid of 429 too many req error
DISCOURSE_MAX_REQS_PER_IP_MODE: none
## How many concurrent web requests are supported? Depends on memory and CPU cores.
## will be set automatically by bootstrap based on detected CPUs, or you can override
UNICORN_WORKERS: 32
## TODO: The domain name this Discourse instance will respond to
#DISCOURSE_HOSTNAME: hidden
DISCOURSE_HOSTNAME:hidden
## Uncomment if you want the container to be started with the same
## hostname (-h option) as specified above (default "$hostname-$config")
#DOCKER_USE_HOSTNAME: true
## TODO: List of comma delimited emails that will be made admin and developer
## on initial signup example 'user1@example.com,user2@example.com'
DISCOURSE_DEVELOPER_EMAILS: "hidden"
## TODO: The SMTP mail server used to validate new accounts and send notifications
# SMTP ADDRESS, username, and password are required
# WARNING the char '#' in SMTP password can cause problems!
DISCOURSE_SMTP_ADDRESS: hidden
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: hidden
DISCOURSE_SMTP_PASSWORD: "hidden"
#DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)
DISCOURSE_SMTP_DOMAIN: hidden
DISCOURSE_NOTIFICATION_EMAIL: hidden
## If you added the Lets Encrypt template, uncomment below to get a free SSL certificate
LETSENCRYPT_ACCOUNT_EMAIL: hidden
## TODO: configure connectivity to the databases
#ljlsdfj;sdfj;lkdsfj
DISCOURSE_DB_SOCKET: ""
#DISCOURSE_DB_USERNAME: hidden
DISCOURSE_DB_PASSWORD: hidden
DISCOURSE_DB_HOST: data
DISCOURSE_REDIS_HOST: data
## The http or https CDN address for this Discourse instance (configured to pull)
## see https://meta.discourse.org/t/14857 for details
## The maxmind geolocation IP address key for IP address lookup
## see https://meta.discourse.org/t/-/137387/23 for details
volumes:
- volume:
host: /var/discourse/shared/web-only
guest: /shared
- volume:
host: /var/discourse/shared/web-only/log/var-log
guest: /var/log
## Plugins go here
## see https://meta.discourse.org/t/19157 for details
hooks:
after_code:
- exec:
cd: $home/plugins
cmd:
- git clone https://github.com/discourse/docker_manager.git
#- git clone https://github.com/discourse/discourse-sitemap.git
#- git clone https://github.com/discourse/discourse-math.git # custom plugin for math JAX support
#- git clone https://github.com/discourse/discourse-solved.git # custom plugin for question and answers and choosing best answer
#- git clone https://github.com/discourse/discourse-voting.git # custom plugin for voting on topics only
#- git clone https://github.com/discourse/discourse-yearly-review.git # custom plugin for automatically posting a yearly topic of forum activity
#- git clone https://github.com/discourse/discourse-user-notes.git # custom plugin to allow staff to add notes about a user
#- git clone https://github.com/paviliondev/discourse-question-answer.git # custom non official plugin for SO style QnA voting on posts
#- git clone https://github.com/discourse/discourse-adplugin.git # custom official plugin for ads
#- git clone https://github.com/discourse/discourse-whos-online.git # custom plugin to see who is online
#- git clone https://github.com/paviliondev/discourse-topic-previews.git # custom plugin for showing topics previews nicely
#- git clone https://github.com/paviliondev/discourse-ratings.git # custom plugin to allow user rating on topics
#- git clone https://github.com/discourse/discourse-cakeday.git # official plugin for birthdays and join date celebrations
#- git clone https://github.com/discourse/discourse-saved-searches.git # official plugin for saved search notifications
#- git clone https://github.com/paviliondev/discourse-follow.git # custom plugin to allow users to follow each other
- git clone https://github.com/FaizanZahid/discourse-amp-htd-plugin.git # custom build AMP support for HTD
#- git clone https://github.com/discourse/discourse-assign.git # custom for assigning topics to staff
#- git clone https://github.com/paviliondev/x-discourse-tlp-thumbnail.git # custom plugin for showing thumbnails from CDN images
#- git clone https://github.com/discourse/discourse-prometheus.git # custom plugin for slow speed monitoring
#- git clone https://github.com/discourse/discourse-push-notifications.git # plugin for push notifications
## Remember, this is YAML syntax - you can only have one block with a name worker_conn was 3000
run:
- exec: echo "Beginning of custom commands"
- replace:
filename: "/etc/nginx/nginx.conf"
from: "worker_connections 768"
to: "worker_connections 4000"
- replace:
filename: "/etc/nginx/nginx.conf"
from: "worker_processes auto"
to: "worker_processes 16"
## If you want to configure password login for root, uncomment and change:
## Use only one of the following lines:
#- exec: /usr/sbin/usermod -p 'PASSWORD_HASH' root
#- exec: /usr/sbin/usermod -p "$(mkpasswd -m sha-256 'RAW_PASSWORD')" root
## If you want to authorized additional users, uncomment and change:
#- exec: ssh-import-id username
#- exec: ssh-import-id anotherusername
- exec: echo "End of custom commands"
- exec: awk -F\# '{print $1;}' ~/.ssh/authorized_keys | awk 'BEGIN { print "Authorized SSH keys for this container:"; } NF>=2 {print $NF;}'
Can anyone help me fix it as my site is down now.
I was also thinking of doing
./launcher rebuild data
There is no nginx and no PHP installed on my server, this means its using internal nginx and internal PHP. So what do i do to fix it and update my discourse and data container?