Compare commits
7 commits
d8384c5b50
...
827a7f7e23
Author | SHA1 | Date | |
---|---|---|---|
827a7f7e23 | |||
83e2ca18e9 | |||
fa6ddb58a5 | |||
fc93b74c19 | |||
16c2031602 | |||
0999aeb1ba | |||
e0fe72b002 |
7 changed files with 67 additions and 4 deletions
3
Makefile
3
Makefile
|
@ -5,6 +5,9 @@ init:
|
||||||
setup: stop
|
setup: stop
|
||||||
@bash mobilizon/mobilizon/docker/message.sh "Compiling everything"
|
@bash mobilizon/mobilizon/docker/message.sh "Compiling everything"
|
||||||
docker-compose run --rm mobilizon bash -c 'mix deps.get; npm ci; npm run build:pictures; mix ecto.create; mix ecto.migrate'
|
docker-compose run --rm mobilizon bash -c 'mix deps.get; npm ci; npm run build:pictures; mix ecto.create; mix ecto.migrate'
|
||||||
|
build: stop
|
||||||
|
@bash mobilizon/mobilizon/docker/message.sh "Compiling backend"
|
||||||
|
docker-compose run --rm mobilizon bash -c 'mix ecto.create'
|
||||||
migrate:
|
migrate:
|
||||||
docker-compose run --rm mobilizon mix ecto.migrate
|
docker-compose run --rm mobilizon mix ecto.migrate
|
||||||
logs:
|
logs:
|
||||||
|
|
|
@ -37,7 +37,7 @@ Currently this has to be done manually:
|
||||||
|
|
||||||
### 8. Create an administrator user for Mobilizon
|
### 8. Create an administrator user for Mobilizon
|
||||||
```
|
```
|
||||||
docker-compose exec mobilizon mix mobilizon.users.new "your@email.com" --admin --password "mypassword"
|
docker-compose exec mobilizon mix mobilizon.users.new "your@email.com" --admin --password "password"
|
||||||
```
|
```
|
||||||
|
|
||||||
### 9. Start developing and debuggin
|
### 9. Start developing and debuggin
|
||||||
|
|
|
@ -49,7 +49,7 @@ services:
|
||||||
environment:
|
environment:
|
||||||
MIX_ENV: "dev"
|
MIX_ENV: "dev"
|
||||||
DOCKER: "true"
|
DOCKER: "true"
|
||||||
MOBILIZON_INSTANCE_NAME: My Local Mobilizon
|
MOBILIZON_INSTANCE_NAME: Mobilizon Local
|
||||||
MOBILIZON_INSTANCE_HOST: mz.lan
|
MOBILIZON_INSTANCE_HOST: mz.lan
|
||||||
MOBILIZON_INSTANCE_HOST_PORT: 443
|
MOBILIZON_INSTANCE_HOST_PORT: 443
|
||||||
MOBILIZON_INSTANCE_PORT: 443
|
MOBILIZON_INSTANCE_PORT: 443
|
||||||
|
@ -75,7 +75,7 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- ./wordpress/wordpress:/var/www/html
|
- ./wordpress/wordpress:/var/www/html
|
||||||
- /etc/ssl/certs/ca-certificates.crt:/var/www/html/wp-includes/certificates/ca-bundle.crt:ro
|
- /etc/ssl/certs/ca-certificates.crt:/var/www/html/wp-includes/certificates/ca-bundle.crt:ro
|
||||||
|
- ./wordpress/vscode/launch.json:/var/www/html/.vscode/launch.json:rw
|
||||||
environment:
|
environment:
|
||||||
- DOCKER_DEV_DOMAIN=wp.lan
|
- DOCKER_DEV_DOMAIN=wp.lan
|
||||||
- WORDPRESS_DB_NAME=wordpress
|
- WORDPRESS_DB_NAME=wordpress
|
||||||
|
@ -114,6 +114,8 @@ services:
|
||||||
environment:
|
environment:
|
||||||
PMA_HOST: mariadb
|
PMA_HOST: mariadb
|
||||||
MYSQL_ROOT_PASSWORD: password
|
MYSQL_ROOT_PASSWORD: password
|
||||||
|
ports:
|
||||||
|
- 8180:80
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
wordpress_database_data:
|
wordpress_database_data:
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM wordpress
|
FROM wordpress:php8.0
|
||||||
|
|
||||||
# Install packages under Debian
|
# Install packages under Debian
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
|
|
13
wordpress/php
Executable file
13
wordpress/php
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Get the directory of the script
|
||||||
|
script_dir="$(dirname "$(readlink -f "$0")")"
|
||||||
|
|
||||||
|
# Construct the path to docker-compose.yml relative to the script
|
||||||
|
compose_file="$script_dir/../docker-compose.yml"
|
||||||
|
|
||||||
|
# Form the docker-compose command
|
||||||
|
command="docker-compose --file $compose_file exec wordpress php "$@""
|
||||||
|
|
||||||
|
# Execute the command
|
||||||
|
$command
|
28
wordpress/setup.sh
Normal file
28
wordpress/setup.sh
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# This script automates the setup of a fresh WordPress installation.
|
||||||
|
|
||||||
|
# Set environment variables if not already set
|
||||||
|
: ${WORDPRESS_TITLE:="WordPress Local"}
|
||||||
|
: ${WORDPRESS_ADMIN_USER:="admin"}
|
||||||
|
: ${WORDPRESS_ADMIN_PASSWORD:="password"}
|
||||||
|
: ${WORDPRESS_ADMIN_MAIL:="your@email.com"}
|
||||||
|
: ${WORDPRESS_LANGUAGE:="de_AT"}
|
||||||
|
|
||||||
|
# Do install step 1
|
||||||
|
curl -X POST -d "language=$WORDPRESS_LANGUAGE" 'http://wp.lan/wp-admin/install.php?step=1'
|
||||||
|
|
||||||
|
# Build the POST data for step 2
|
||||||
|
POST_DATA="weblog_title=$WORDPRESS_TITLE"
|
||||||
|
POST_DATA+="&user_name=$WORDPRESS_USER"
|
||||||
|
POST_DATA+="&admin_password=$ADMIN_PWORDPRESS_PASSWORDASSWORD"
|
||||||
|
POST_DATA+="&admin_password2=$ADMIN_PASSWORD"
|
||||||
|
POST_DATA+="&pw_weak=on"
|
||||||
|
POST_DATA+="&admin_email=$ADMIN_EMAIL"
|
||||||
|
POST_DATA+="&Submit=WordPress+installieren"
|
||||||
|
POST_DATA+="&language=$WORDPRESS_LANGUAGE"
|
||||||
|
|
||||||
|
# Make the POST request for setup step 2
|
||||||
|
curl -X POST -d "$POST_DATA" 'http://wp.lan/wp-admin/install.php?step=2'
|
||||||
|
|
||||||
|
|
17
wordpress/vscode/launch.json
Normal file
17
wordpress/vscode/launch.json
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
// Use IntelliSense to learn about possible attributes.
|
||||||
|
// Hover to view descriptions of existing attributes.
|
||||||
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Listen for Xdebug",
|
||||||
|
"type": "php",
|
||||||
|
"request": "launch",
|
||||||
|
"port": 9003,
|
||||||
|
"pathMappings": {
|
||||||
|
"/var/www/html": "${workspaceRoot}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Loading…
Reference in a new issue