fix: url issues + setup for eval

This commit is contained in:
Lenoctambule
2026-04-06 16:04:46 +02:00
parent 997ffcacfb
commit 6e07217626
5 changed files with 37 additions and 5 deletions

View File

@@ -14,3 +14,9 @@
ansible.builtin.file:
state: absent
path: "{{ dest_dir }}"
- name: Remove schedule to start app at reboot
ansible.builtin.cron:
name: "Start app at boot"
special_time: reboot
state: absent

View File

@@ -83,10 +83,32 @@ services:
- site_data:/var/www/html
depends_on:
- wordpress
- mariadb
working_dir: /var/www/html
command: >
/bin/sh -c 'sleep 10; wp core install --url=https://$APP_DOMAIN --title="Le Noctambule" --admin_name=$WP_ADMIN --admin_password=$WP_ADMIN_PWD --admin_email=$WP_ADMIN_EMAIL; wp user create $WP_USER $WP_EMAIL --user_pass=$WP_PWD --role=author'
command: >
/bin/sh -c '
sleep 10;
until wp core install \
--url=https://$APP_DOMAIN \
--title="Le Noctambule" \
--admin_name=$WP_ADMIN \
--admin_password=$WP_ADMIN_PWD \
--admin_email=$WP_ADMIN_EMAIL
do
echo "Waiting for WordPress to be ready...";
sleep 5;
done;
until wp user create \
$WP_USER $WP_EMAIL \
--user_pass=$WP_PWD \
--role=author
do
echo "Retrying user creation...";
sleep 5;
done;
'
nginx:
container_name: nginx
image: nginx:latest

5
inventory/remote.yml Normal file
View File

@@ -0,0 +1,5 @@
hosts:
hosts:
161.35.155.92:
ansible_port: 22
ansible_user: root

View File

@@ -7,4 +7,4 @@ WP_EMAIL={{WP_EMAIL}}
WP_ADMIN={{WP_ADMIN}}
WP_ADMIN_PWD={{WP_ADMIN_PWD}}
WP_ADMIN_EMAIL={{WP_ADMIN_EMAIL}}
APP_DOMAIN={{cert_domain}}
APP_DOMAIN={{ inventory_hostname }}

View File

@@ -1,7 +1,6 @@
is_local: true
passphrase: changeme
cert_domain: "example.com"
cert_email: "admin@example.com"
cert_domain: "{{ inventory_hostname }}"
dest_dir: /var/app/
cert_path: "{{ dest_dir }}/srcs/nginx/certbot/conf/live/{{ cert_domain }}"