Compare commits
6 Commits
cf00cc81da
...
main
Author | SHA1 | Date | |
---|---|---|---|
5794d7f9ce
|
|||
e21080fae8
|
|||
b0d12b11f3
|
|||
3e92ae47a5 | |||
9b2f5eec60 | |||
8870e4b837 |
@ -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) #
|
||||
##############################################################################
|
||||
|
@ -1,3 +1,4 @@
|
||||
.drone.yml
|
||||
.env.sample
|
||||
.gitignore
|
||||
README.md
|
||||
|
4
.gitignore
vendored
4
.gitignore
vendored
@ -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
|
||||
|
15
README.md
15
README.md
@ -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
|
||||
|
||||
---
|
||||
|
||||
|
@ -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
|
||||
|
2
makefile
2
makefile
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user