Skip to content

Commit 93e201f

Browse files
authored
Fix handling of files and switch to node16 (#3)
As the action fails in outer workflows with `./services/docker-compose.yml not exists` we try to calculate paths inside the action path. We also switch to node `lts/gallium` as this version is mentioned in official documentation. A build script was defined in `package.json` to simplify the build of a new package. Last but not least we tweak our gitignore a bit to install needed packages for development but do not commit these to repository.
1 parent 0ba39c9 commit 93e201f

File tree

9 files changed

+465
-432
lines changed

9 files changed

+465
-432
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ bower_components
3939
build/Release
4040

4141
# Dependency directories
42+
node_modules/*
43+
node_modules/.bin
4244
jspm_packages/
4345

4446
# Snowpack dependency directory (https://snowpack.dev/)

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ inputs:
2222
required: false
2323
default: "rootpw"
2424
runs:
25-
using: 'node12'
25+
using: 'node16'
2626
main: 'dist/index.js'
2727
# post: 'post.js'
2828
branding:

dist/docker-compose.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
version: '3'
2+
services:
3+
phpipam:
4+
image: phpipam/phpipam-www:v1.4.4
5+
ports:
6+
- "443:443"
7+
environment:
8+
IPAM_DATABASE_HOST: "database"
9+
IPAM_DATABASE_USER: "phpipam"
10+
IPAM_DATABASE_PASS: "phpipamadmin"
11+
IPAM_DATABASE_NAME: "phpipam"
12+
depends_on:
13+
- database
14+
database:
15+
image: mariadb:10.3.18
16+
ports:
17+
- "3306:3306"
18+
environment:
19+
MYSQL_ROOT_PASSWORD: "rootpw"
20+
MYSQL_USER: "phpipam"
21+
MYSQL_PASSWORD: "phpipamadmin"
22+
MYSQL_DATABASE: "phpipam"

dist/exec.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
exec_list:
3+
- name: init database
4+
container: phpipam
5+
commands:
6+
- ["sh", "-c", "mysql -h database -u phpipam -pphpipamadmin phpipam < /phpipam/db/SCHEMA.sql"]
7+
- ["sh", "-c", "mysql -h database -u phpipam -pphpipamadmin phpipam --execute=\"UPDATE settings SET api=1 WHERE id=1;\""]
8+
- ["sh", "-c", "mysql -h database -u phpipam -pphpipamadmin phpipam --execute=\"INSERT INTO api (app_id, app_code, app_permissions, app_security, app_lock_wait) VALUES ('ansible','aAbBcCdDeEfF00112233445566778899',2,'ssl_token',0);\""]
9+
- ["sh", "-c", "mysql -h database -u phpipam -pphpipamadmin phpipam --execute=\"UPDATE users SET passChange = 'No' WHERE username = 'Admin';\""]

0 commit comments

Comments
 (0)