Basic imageboard engine written in rust
and actix-web
.
Features:
- Written in Rust (blazingly fast btw) and completely JS-free by default
- Website frontend is completely data-driven; you can change it in any way (as long as you keep the handlebars templates and general file structure)
- Supports both SQLite and Postgres databases
A standalone Docker image is available for ACSIM.
sudo docker run --net=host -e ACSIM_PASS_OVERRIDE=YOURADMINPASSWORD --mount source=acs_data,target=/acsim/data --mount source=acs_frontends,target=/acsim/frontends jbruws/acsim:latest
This command will set up an SQLite-based instance with two Docker volumes for web frontend and board backend data, as well as a unique password for admin dashboard (available at 127.0.0.1:8080/dashboard
). This is probably the fastest way to spin up an instance.
You can also set up a Postgres-based instance via Compose.
-
Download the
compose.yaml
andpg_init.sql
files:curl -L http://github.com/jbruws/acsim/raw/master/compose.yaml > compose.yaml
curl -L http://github.com/jbruws/acsim/raw/master/pg_init.sql > pg_init.sql
-
Use your preferred text editor to add an
ACSIM_PASS_OVERRIDE
env variable to theboard.environment
section incompose.yaml
in order to set the password to ACSIM's admin dashboard. Said section should look like this afterwards:environment: PGHOST: 'db' PGDATABASE: 'acsim_db' PGUSER: 'postgres' PGPASSWORD: 'generic' ACSIM_PASS_OVERRIDE: 'YOUR_ADMIN_DASHBOARD_PASSWORD' acsim_compose: 1
-
Launch the cluster:
sudo docker compose up
If the board fails to start due to database connection error, just wait for the database to finish initializing and restart the entire cluster.
That should service the board at localhost:8080
, with admin dashboard available at localhost:8080/dashboard
. Docker volumes for board data, board frontend and Postgres data will also be automatically created.
-
Install the dependencies:
cargo
git
sqlite3
(if you will use SQLite database)postgresql
(if you will use Postgres database)libssl-dev
libmagic-dev
-
Clone the repository and enter it:
git clone https://github.com/jbruws/acsim.git
cd acsim
DO NOT change directory afterwards, as this will break relative paths in
setup.sh
script. Just launch everything from theacsim
directory. -
Once you're in the
acsim
directory, run thesetup.sh
script, either withSQLITE
argument and no username orPOSTGRES
argument and username you wish to use to connect to the database. Here's examples:-
./setup.sh POSTGRES postgres
-
./setup.sh SQLITE
You'll be prompted for a admin password. It's stored as a hash, so don't forget it!
View
.env
anddata/config.yaml
files and check them for any errors. -
-
Finally, run the program:
cargo run
Once the compilation finishes, application logs will start appearing in the console and in data/acsim.log
file. Navigate to localhost:8080
in your browser, and you should be greeted with ACSIM's home page. By default, the server will be accessible through any IP (0.0.0.0
), as long as the port 8080 is open.
@ZueffC - testing, coding advice
@CppCoder1, @Befrimon - testing