Compare commits
7 Commits
96ba5b5d73
...
ed46d10393
Author | SHA1 | Date |
---|---|---|
Niklas | ed46d10393 | |
Niklas | 34d756c2e1 | |
Niklas | 9498ba724b | |
Niklas | 72b3a692b7 | |
Niklas | ff4be289fc | |
Niklas | 8651e60bf8 | |
Niklas | fd8d2d1427 |
|
@ -0,0 +1,93 @@
|
|||
APP_NAME=Laravel
|
||||
APP_ENV=production
|
||||
APP_KEY=base64:VcFHbHg+rGs3CWrjPOvTpg+9am00e3GCAx4Iyrg9p+c=
|
||||
APP_DEBUG=false
|
||||
APP_URL=http://127.0.0.1:8081
|
||||
|
||||
LOG_CHANNEL=stack
|
||||
LOG_DEPRECATIONS_CHANNEL=null
|
||||
LOG_LEVEL=debug
|
||||
|
||||
# Change those to match your database settings
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=db
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=arcturus
|
||||
DB_USERNAME=arcturus_user
|
||||
DB_PASSWORD=arcturus_pw
|
||||
|
||||
BROADCAST_DRIVER=log
|
||||
CACHE_DRIVER=file
|
||||
FILESYSTEM_DISK=local
|
||||
QUEUE_CONNECTION=sync
|
||||
SESSION_DRIVER=database
|
||||
SESSION_LIFETIME=120
|
||||
|
||||
MEMCACHED_HOST=127.0.0.1
|
||||
|
||||
REDIS_HOST=127.0.0.1
|
||||
REDIS_PASSWORD=null
|
||||
REDIS_PORT=6379
|
||||
|
||||
MAIL_MAILER=smtp
|
||||
MAIL_HOST=mailhog
|
||||
MAIL_PORT=1025
|
||||
MAIL_USERNAME=null
|
||||
MAIL_PASSWORD=null
|
||||
MAIL_ENCRYPTION=null
|
||||
MAIL_FROM_ADDRESS="hello@example.com"
|
||||
MAIL_FROM_NAME="${APP_NAME}"
|
||||
|
||||
AWS_ACCESS_KEY_ID=
|
||||
AWS_SECRET_ACCESS_KEY=
|
||||
AWS_DEFAULT_REGION=us-east-1
|
||||
AWS_BUCKET=
|
||||
AWS_USE_PATH_STYLE_ENDPOINT=false
|
||||
|
||||
PUSHER_APP_ID=
|
||||
PUSHER_APP_KEY=
|
||||
PUSHER_APP_SECRET=
|
||||
PUSHER_HOST=
|
||||
PUSHER_PORT=443
|
||||
PUSHER_SCHEME=https
|
||||
PUSHER_APP_CLUSTER=mt1
|
||||
|
||||
VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
|
||||
VITE_PUSHER_HOST="${PUSHER_HOST}"
|
||||
VITE_PUSHER_PORT="${PUSHER_PORT}"
|
||||
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
|
||||
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
||||
|
||||
NITRO_CLIENT_PATH=http://127.0.0.1:3000
|
||||
|
||||
# If set to true, Atom will rename any colliding table names when migration the first time around
|
||||
RENAME_COLLIDING_TABLES=false
|
||||
|
||||
# Only enable if you come from a CMS like RevCMS
|
||||
# This will only work if your password is hashed using md5
|
||||
# By default Atom CMS uses bcrypt, this is purely used to ease the process, when switching from a CMS using md5
|
||||
CONVERT_PASSWORDS=false
|
||||
|
||||
# Enable this if your site is running through https, but you're experiencing issues with requests being made to "http"
|
||||
FORCE_HTTPS=false
|
||||
|
||||
# Default language for the site
|
||||
APP_LOCALE=de
|
||||
|
||||
# General paypal options
|
||||
PAYPAL_MODE='sandbox'
|
||||
PAYPAL_PAYMENT_ACTION='Order'
|
||||
PAYPAL_CURRENCY='USD'
|
||||
PAYPAL_NOTIFY_URL=
|
||||
PAYPAL_LOCALE='en_US'
|
||||
PAYPAL_VALIDATE_SSL=true
|
||||
|
||||
#PayPal Setting & API Credentials - sandbox
|
||||
PAYPAL_SANDBOX_CLIENT_ID=
|
||||
PAYPAL_SANDBOX_CLIENT_SECRET=
|
||||
PAYPAL_SANDBOX_APP_ID=
|
||||
|
||||
#PayPal Setting & API Credentials - live
|
||||
PAYPAL_LIVE_CLIENT_ID=
|
||||
PAYPAL_LIVE_CLIENT_SECRET=
|
||||
PAYPAL_LIVE_APP_ID=
|
|
@ -10,4 +10,10 @@ assets/swf
|
|||
assets/usercontent/**/*.png
|
||||
~$*.xlsx
|
||||
export/
|
||||
assets/usercontent/imageproxy/
|
||||
assets/usercontent/imageproxy/
|
||||
atomcms/cache/*
|
||||
atomcms/storage/*
|
||||
atomcms/logs/*
|
||||
!atomcms/cache/.gitkeep
|
||||
!atomcms/storage/.gitkeep
|
||||
!atomcms/logs/.gitkeep
|
||||
|
|
57
README.md
57
README.md
|
@ -39,7 +39,7 @@ https://git.krews.org/morningstar/Arcturus-Community/-/archive/ms4/dev/Arcturus-
|
|||
```text
|
||||
# **Default login credentials using HeidySQL:**
|
||||
# Network type: MariaDB or MySQL (TCP/IP)
|
||||
# Library: libmariadb.dll
|
||||
# Library: libmysql.dll
|
||||
# Hostname /IP: YOURSERVERIPHERE!!
|
||||
# User: arcturus_user
|
||||
# Password: arcturus_pw
|
||||
|
@ -94,9 +94,8 @@ UPDATE emulator_settings SET `value`='/app/assets/swf/c_images/Badgeparts' WHERE
|
|||
```bash
|
||||
docker compose up assets -d && \
|
||||
docker compose up assets-build --build && \
|
||||
docker compose up imager --build -d && \
|
||||
docker compose up arcturus --build -d && \
|
||||
docker compose up backup -d
|
||||
docker compose up imgproxy --build -d && \
|
||||
docker compose up arcturus --build -d
|
||||
```
|
||||
|
||||
7. Update the: `nitro/renderer-config.json` and `nitro/ui-config.json` values to your setup. If the deployment is buggy or throws any errors check the json files for updates. then Build and Start Nitro
|
||||
|
@ -176,8 +175,56 @@ python SQLGenerator.py
|
|||
docker compose restart arcturus
|
||||
```
|
||||
|
||||
## AtomCMS
|
||||
|
||||
1. change [`.env.cms`](/.env.cms) to your needs
|
||||
|
||||
2. Check your permissions table. Use [**perms_groups.sql**](/arcturus/perms_groups.sql) if unclear. AtomCMS is not using the new permission layout so we are legacy supporting it by "copy" the most important values.
|
||||
|
||||
4. Start the CMS
|
||||
```bash
|
||||
docker compose up cms --build -d
|
||||
```
|
||||
|
||||
5. Generate a new secret APP_KEY
|
||||
```bash
|
||||
docker compose exec cms php artisan key:generate
|
||||
```
|
||||
|
||||
6. Open the CMS in the browser by default [`127.0.0.1:8081`](http://127.0.0.1:8081/) and do the basic setup.
|
||||
|
||||
7. Update automcms settings with HeidiSQL
|
||||
|
||||
```sql
|
||||
UPDATE website_settings SET `value` = 'http://127.0.0.1:8080/api/imager/?figure=' WHERE `key` = 'avatar_imager';
|
||||
UPDATE website_settings SET `value` = 'http://127.0.0.1:8080/swf/c_images/album1584' WHERE `key` = 'badges_path';
|
||||
UPDATE website_settings SET `value` = 'http://127.0.0.1:8080/usercontent/badgeparts/generated' WHERE `key` = 'group_badge_path';
|
||||
UPDATE website_settings SET `value` = 'http://127.0.0.1:8080/swf/dcr/hof_furni' WHERE `key` = 'furniture_icons_path';
|
||||
|
||||
UPDATE website_settings SET `value` = 'arcturus' WHERE `key` = 'rcon_ip';
|
||||
UPDATE website_settings SET `value` = '3001' WHERE `key` = 'rcon_port';
|
||||
|
||||
-- check values - these values are for the perms_groups.sql
|
||||
UPDATE website_settings SET `value` = '11' WHERE `key` = 'min_staff_rank';
|
||||
UPDATE website_settings SET `value` = '12' WHERE `key` = 'min_maintenance_login_rank';
|
||||
UPDATE website_settings SET `value` = '13' WHERE `key` = 'min_housekeeping_rank';
|
||||
```
|
||||
|
||||
**ℹ Notice**: badgeparts generator must be set up in arcturus and all files must be synced with the badge_parts.nitro
|
||||
|
||||
## Create an archive/backup
|
||||
|
||||
### Export running containers
|
||||
```bash
|
||||
7z a -mx=9 nitro-$(date -d "today" +"%Y%m%d_%H%M").7z ./
|
||||
bash ./export_containers.sh
|
||||
```
|
||||
|
||||
### Create manual database backup
|
||||
```bash
|
||||
docker compose exec backup backup-now
|
||||
```
|
||||
|
||||
### Save all data
|
||||
```bash
|
||||
7z a -mx=9 nitro-$(date -d "today" +"%Y%m%d_%H%M").7z ./ '-x!db/data' '-x!.git/' '-x!logs/' '-x!cache/'
|
||||
```
|
|
@ -1,4 +1,11 @@
|
|||
-- auto generated by mc8051.de
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
-- delete existing data
|
||||
TRUNCATE permission_group_commands;
|
||||
TRUNCATE permission_group_rights;
|
||||
TRUNCATE permission_groups;
|
||||
-- clear legacy permissions for support of autocms
|
||||
TRUNCATE permissions;
|
||||
-- permission group Member
|
||||
INSERT INTO permission_groups (id, name, description, level, prefix, prefix_color, badge, room_effect, log_enabled) VALUES ('8', 'Member', '', '1', '', '', '', '0', '1');
|
||||
INSERT INTO permission_group_commands (group_id, command_name, setting_type) VALUES ('8', 'cmd_add_youtube_playlist', '0');
|
||||
|
@ -158,6 +165,8 @@ INSERT INTO permission_group_rights (group_id, right_name, setting_type) VALUES
|
|||
INSERT INTO permission_group_rights (group_id, right_name, setting_type) VALUES ('8', 'acc_unkickable', '0');
|
||||
INSERT INTO permission_group_rights (group_id, right_name, setting_type) VALUES ('8', 'acc_unlimited_bots', '0');
|
||||
INSERT INTO permission_group_rights (group_id, right_name, setting_type) VALUES ('8', 'acc_unlimited_pets', '0');
|
||||
-- legacy table
|
||||
INSERT INTO permissions (id, rank_name, prefix, prefix_color) VALUES ('8', 'Member', '', '');
|
||||
|
||||
|
||||
-- permission group VIP
|
||||
|
@ -319,6 +328,8 @@ INSERT INTO permission_group_rights (group_id, right_name, setting_type) VALUES
|
|||
INSERT INTO permission_group_rights (group_id, right_name, setting_type) VALUES ('9', 'acc_unkickable', '0');
|
||||
INSERT INTO permission_group_rights (group_id, right_name, setting_type) VALUES ('9', 'acc_unlimited_bots', '0');
|
||||
INSERT INTO permission_group_rights (group_id, right_name, setting_type) VALUES ('9', 'acc_unlimited_pets', '0');
|
||||
-- legacy table
|
||||
INSERT INTO permissions (id, rank_name, prefix, prefix_color) VALUES ('9', 'VIP', '', '');
|
||||
|
||||
|
||||
-- permission group Placeholder
|
||||
|
@ -480,6 +491,8 @@ INSERT INTO permission_group_rights (group_id, right_name, setting_type) VALUES
|
|||
INSERT INTO permission_group_rights (group_id, right_name, setting_type) VALUES ('10', 'acc_unkickable', '0');
|
||||
INSERT INTO permission_group_rights (group_id, right_name, setting_type) VALUES ('10', 'acc_unlimited_bots', '0');
|
||||
INSERT INTO permission_group_rights (group_id, right_name, setting_type) VALUES ('10', 'acc_unlimited_pets', '0');
|
||||
-- legacy table
|
||||
INSERT INTO permissions (id, rank_name, prefix, prefix_color) VALUES ('10', 'Placeholder', '', '');
|
||||
|
||||
|
||||
-- permission group Support
|
||||
|
@ -641,6 +654,8 @@ INSERT INTO permission_group_rights (group_id, right_name, setting_type) VALUES
|
|||
INSERT INTO permission_group_rights (group_id, right_name, setting_type) VALUES ('11', 'acc_unkickable', '0');
|
||||
INSERT INTO permission_group_rights (group_id, right_name, setting_type) VALUES ('11', 'acc_unlimited_bots', '0');
|
||||
INSERT INTO permission_group_rights (group_id, right_name, setting_type) VALUES ('11', 'acc_unlimited_pets', '0');
|
||||
-- legacy table
|
||||
INSERT INTO permissions (id, rank_name, prefix, prefix_color) VALUES ('11', 'Support', 'SUP', '');
|
||||
|
||||
|
||||
-- permission group Moderator
|
||||
|
@ -802,6 +817,8 @@ INSERT INTO permission_group_rights (group_id, right_name, setting_type) VALUES
|
|||
INSERT INTO permission_group_rights (group_id, right_name, setting_type) VALUES ('12', 'acc_unkickable', '0');
|
||||
INSERT INTO permission_group_rights (group_id, right_name, setting_type) VALUES ('12', 'acc_unlimited_bots', '0');
|
||||
INSERT INTO permission_group_rights (group_id, right_name, setting_type) VALUES ('12', 'acc_unlimited_pets', '0');
|
||||
-- legacy table
|
||||
INSERT INTO permissions (id, rank_name, prefix, prefix_color) VALUES ('12', 'Moderator', 'MOD', '#d620b8');
|
||||
|
||||
|
||||
-- permission group Super Mod
|
||||
|
@ -963,6 +980,8 @@ INSERT INTO permission_group_rights (group_id, right_name, setting_type) VALUES
|
|||
INSERT INTO permission_group_rights (group_id, right_name, setting_type) VALUES ('13', 'acc_unkickable', '1');
|
||||
INSERT INTO permission_group_rights (group_id, right_name, setting_type) VALUES ('13', 'acc_unlimited_bots', '1');
|
||||
INSERT INTO permission_group_rights (group_id, right_name, setting_type) VALUES ('13', 'acc_unlimited_pets', '1');
|
||||
-- legacy table
|
||||
INSERT INTO permissions (id, rank_name, prefix, prefix_color) VALUES ('13', 'Super Mod', 'ADM', '#4220d6');
|
||||
|
||||
|
||||
-- permission group Admin
|
||||
|
@ -1124,5 +1143,8 @@ INSERT INTO permission_group_rights (group_id, right_name, setting_type) VALUES
|
|||
INSERT INTO permission_group_rights (group_id, right_name, setting_type) VALUES ('14', 'acc_unkickable', '1');
|
||||
INSERT INTO permission_group_rights (group_id, right_name, setting_type) VALUES ('14', 'acc_unlimited_bots', '1');
|
||||
INSERT INTO permission_group_rights (group_id, right_name, setting_type) VALUES ('14', 'acc_unlimited_pets', '1');
|
||||
-- legacy table
|
||||
INSERT INTO permissions (id, rank_name, prefix, prefix_color) VALUES ('14', 'Admin', 'ADM', '#de1f1f');
|
||||
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
|
|
@ -49,6 +49,16 @@ def generate_insert_sql(table_name, data):
|
|||
with open("perms_groups.sql", 'w', encoding="utf-8") as file:
|
||||
file.write(f"-- auto generated by mc8051.de\n")
|
||||
|
||||
file.write(f"SET FOREIGN_KEY_CHECKS = 0;\n")
|
||||
|
||||
file.write(f"-- delete existing data\n")
|
||||
file.write(f"TRUNCATE permission_group_commands;\n")
|
||||
file.write(f"TRUNCATE permission_group_rights;\n")
|
||||
file.write(f"TRUNCATE permission_groups;\n")
|
||||
|
||||
file.write(f"-- clear legacy permissions for support of autocms\n")
|
||||
file.write(f"TRUNCATE permissions;\n")
|
||||
|
||||
for group in groups:
|
||||
file.write(f"-- permission group {group['name']}\n")
|
||||
group_id = group["id"]
|
||||
|
@ -67,4 +77,8 @@ with open("perms_groups.sql", 'w', encoding="utf-8") as file:
|
|||
sql = generate_insert_sql("permission_group_rights", {"group_id": group_id, "right_name": key, "setting_type": group[key]})
|
||||
file.write(sql + "\n")
|
||||
|
||||
file.write("-- legacy table\n")
|
||||
sql = generate_insert_sql("permissions", {"id": group_id, "rank_name": group["name"], "prefix": group["prefix"], "prefix_color": group["prefix_color"]})
|
||||
file.write(sql + "\n")
|
||||
file.write("\n\n")
|
||||
file.write(f"SET FOREIGN_KEY_CHECKS = 1;\n")
|
||||
|
|
|
@ -39,6 +39,10 @@ server {
|
|||
proxy_pass http://imgproxy:8080/;
|
||||
}
|
||||
|
||||
location ^~ /api/imager/ {
|
||||
proxy_pass http://imager:3000/;
|
||||
}
|
||||
|
||||
location ~* (.*/thumbnail)/(.+\.png)$ {
|
||||
# kill cache
|
||||
expires -1;
|
||||
|
|
|
@ -0,0 +1,75 @@
|
|||
FROM php:8.2-apache as builder
|
||||
|
||||
ARG COMMIT=d0c28fb
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libcurl4-openssl-dev \
|
||||
libfreetype6-dev \
|
||||
libjpeg62-turbo-dev \
|
||||
libpng-dev \
|
||||
libonig-dev \
|
||||
libssl-dev \
|
||||
libzip-dev \
|
||||
git \
|
||||
zip \
|
||||
unzip \
|
||||
&& docker-php-ext-install -j$(nproc) curl gd mbstring pdo_mysql sockets fileinfo zip \
|
||||
&& docker-php-ext-enable curl gd mbstring pdo_mysql sockets fileinfo zip
|
||||
|
||||
COPY --from=composer:lts /usr/bin/composer /usr/local/bin/composer
|
||||
|
||||
RUN git config --global --add safe.directory /var/www/html
|
||||
RUN git clone --recurse-submodules https://github.com/ObjectRetros/atomcms.git .
|
||||
RUN git checkout $COMMIT
|
||||
|
||||
RUN composer install
|
||||
|
||||
|
||||
# ---------------------------------------------
|
||||
FROM node:lts-alpine as npm-builder
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
||||
COPY --from=builder /var/www/html /var/www/html
|
||||
|
||||
RUN yarn install
|
||||
RUN yarn run build:atom
|
||||
|
||||
|
||||
# ---------------------------------------------
|
||||
FROM php:8.2-apache
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libcurl4-openssl-dev \
|
||||
libfreetype6-dev \
|
||||
libjpeg62-turbo-dev \
|
||||
libpng-dev \
|
||||
libonig-dev \
|
||||
libssl-dev \
|
||||
libzip-dev \
|
||||
&& docker-php-ext-install -j$(nproc) curl gd mbstring pdo_mysql sockets fileinfo \
|
||||
&& docker-php-ext-enable curl gd mbstring pdo_mysql sockets fileinfo
|
||||
RUN apt remove apt --autoremove -y --allow-remove-essential
|
||||
|
||||
RUN a2enmod rewrite
|
||||
|
||||
COPY --from=npm-builder /var/www/html /var/www/html
|
||||
RUN rm -rf /var/www/html/node_modules
|
||||
|
||||
RUN chown -R www-data:www-data /var/www/html/storage \
|
||||
&& chown -R www-data:www-data /var/www/html/bootstrap/cache
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
ENV APACHE_DOCUMENT_ROOT /var/www/html/public
|
||||
|
||||
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf \
|
||||
&& sed -ri -e 's!AllowOverride None!AllowOverride All!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
|
||||
|
||||
RUN echo 'max_execution_time = 120' >> /usr/local/etc/php/conf.d/docker-php-maxexectime.ini;
|
||||
|
||||
CMD ["apache2-foreground"]
|
28
compose.yaml
28
compose.yaml
|
@ -43,8 +43,9 @@ services:
|
|||
networks: [nitro]
|
||||
|
||||
db:
|
||||
image: mariadb:10
|
||||
command: --default-authentication-plugin=mysql_native_password
|
||||
image: mysql:8
|
||||
depends_on:
|
||||
- backup
|
||||
env_file:
|
||||
- .env
|
||||
ports:
|
||||
|
@ -58,13 +59,11 @@ services:
|
|||
|
||||
backup:
|
||||
image: tiredofit/db-backup
|
||||
depends_on:
|
||||
- db
|
||||
volumes:
|
||||
- ./db/backup:/backup
|
||||
environment:
|
||||
- TIMEZONE=UTC
|
||||
- DB_TYPE=mariadb
|
||||
- DB_TYPE=mysql
|
||||
- DB_HOST=db
|
||||
- DB_USER=$MYSQL_USER
|
||||
- DB_PASS=$MYSQL_PASSWORD
|
||||
|
@ -95,12 +94,13 @@ services:
|
|||
imager:
|
||||
build:
|
||||
context: imager
|
||||
depends_on:
|
||||
# proxied through nginx of assets
|
||||
- assets
|
||||
env_file:
|
||||
- .env
|
||||
volumes:
|
||||
- ./assets/:/app/assets/
|
||||
ports:
|
||||
- 3001:3000
|
||||
restart: unless-stopped
|
||||
networks: [nitro]
|
||||
|
||||
|
@ -116,5 +116,19 @@ services:
|
|||
restart: unless-stopped
|
||||
networks: [nitro]
|
||||
|
||||
cms:
|
||||
build:
|
||||
context: atomcms
|
||||
depends_on:
|
||||
- imager
|
||||
- arcturus
|
||||
ports:
|
||||
- "8081:80"
|
||||
volumes:
|
||||
- ".env.cms:/var/www/html/.env"
|
||||
- "./atomcms/storage:/var/www/html/storage/app/public"
|
||||
- "./atomcms/logs:/var/www/html/storage/logs"
|
||||
networks: [nitro]
|
||||
|
||||
networks:
|
||||
nitro:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
FROM node:lts-alpine as builder
|
||||
|
||||
ARG BRANCH=main
|
||||
ARG COMMIT=9a88668
|
||||
ARG COMMIT=ee47e21
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
|
|
Loading…
Reference in New Issue