Compare commits

...

6 Commits

Author SHA1 Message Date
5794d7f9ce Updated capitalisation and fix typo 2024-10-01 16:40:45 +01:00
e21080fae8 Updated header 2024-10-01 16:39:29 +01:00
b0d12b11f3 Updated README with better instructions 2024-10-01 16:38:22 +01:00
3wc
3e92ae47a5 Update wordpress 2024-05-15 23:10:56 -03:00
3wc
9b2f5eec60 Allow customising username to reset password of 2024-05-15 23:08:24 -03:00
3wc
8870e4b837 Switch back to default-ignore-all-wp-content 2024-05-15 23:08:12 -03:00
6 changed files with 23 additions and 6 deletions

View File

@ -1,7 +1,10 @@
##############################################################################
# REQUIRED SETTINGS (you will need these) #
##############################################################################
# What username should `set_local_password` operate on?
USERNAME=admin
##############################################################################
# COMMON SETTINGS (you may need these) #
##############################################################################

View File

@ -1,3 +1,4 @@
.drone.yml
.env.sample
.gitignore
README.md

4
.gitignore vendored
View File

@ -1,6 +1,8 @@
/.env
/wp-content/twenty*
/wp-content/**
# Add an exception here for any custom plugins or themes to be included, e.g.
#!/wp-content/themes/${REPO_NAME_SNAKE}
/data/**
!/data/.gitkeep

View File

@ -1,15 +1,26 @@
A template for Autonomic Wordpress projects, including local set-up, and auto-deployment.
To use it:
# Usage
1. Make a new repository, using this as a template
2. Remove this notice from `README.md` (everything until the `---`)
3. Create and deploy a Co-op Cloud Wordpress app
4. Edit `.env.sample` to set `SITE_URL` (and customise `PROJECT_NAME`, if
needed)
- Change USERNAME to whatever the wordpress admin username is / should be
- Set SITE_URL to the live site URL
- Set PROJECT_NAME to some identifier for the project
5. Make sure `.drone.yml` has the right settings for the server you'd like to
deploy to
deploy
- Change host to the FQDN of the host, likely smol-wp.autonomic.zone
- Set service to the docker service name, usually <app_name_snake_case>_app so like display_distribute_com_app
- Update source and exec_pre to the path to the theme
- Comment exec: composer install if composer isn't in use
- Set `deploy_key: from_secret:` to the secret name of the SSH key to access the server. this requires logging into drone as autonomic admin, then checking "organisation secrets" on the repo settings page of any repo in the same org. or you can use drone CLI and do drone orgsecret ls
6. Add any custom plugins / themes to `wp-content`
- Copying / moving files into the repo in wp-content, and possibly / probably excluding them from .gitignore
7. "Activate" this repository in Drone
- e.g. click "activate repository" here https://drone.autonomic.zone/autonomic-cooperative/display-distribute/settings
8. Commit to the repo to test and monitor the drone interface to troubleshoot
---

View File

@ -3,7 +3,7 @@ version: "3"
services:
wordpress:
image: "wordpress:6.2.0"
image: "wordpress:6.5.3"
ports:
- "80:80"
dns: 4.2.2.4

View File

@ -123,7 +123,7 @@ fix_url:
$(_DOCKER_COMPOSE) exec -u user wordpress wp --url=https://$(SITE_URL) search-replace --all-tables-with-prefix 'https://$(SITE_URL)' 'http://$(PROJECT_NAME).localhost'
set_local_password:
$(_DOCKER_COMPOSE) exec -u user wordpress wp user update admin --user_pass=password
$(_DOCKER_COMPOSE) exec -u user wordpress wp user update $(USERNAME) --user_pass=password
db_pull: db_fetch db_load fix_url