Installation Process
To install LinkAce, you'll want to SSH into your server and navigate to where you want to install the containers. I install them in /home in this demonstration.
So you'll type:
cd /home
Then you'll want to make a LinkAce directory and cd into that directory
mkdir LinkAce && cd LinkAce
Next step is to create 2 files:
touch docker-compose.yml
touch .env
Now, let's edit the docker-compose file:
nano docker-compose.yml
Paste the following into the docker-compose.yml:
version: "3"
services:
# --- MariaDB
db:
image: mariadb:10.5
restart: unless-stopped
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_bin
environment:
- MYSQL_ROOT_PASSWORD=${DB_PASSWORD}
- MYSQL_USER=${DB_USERNAME}
- MYSQL_PASSWORD=${DB_PASSWORD}
- MYSQL_DATABASE=${DB_DATABASE}
volumes:
- db:/var/lib/mysql
# --- LinkAce Image with PHP 7.4 and nginx
app:
image: linkace/linkace:simple
restart: unless-stopped
depends_on:
- db
ports:
- 80:80
volumes:
- ./.env:/app/.env
- linkace_logs:/app/storage/logs
volumes:
linkace_logs:
db:
driver: local
Change port 80 to whatever port you want to use so that it is something like: 81:80
Now save and exit: CTRL+O, Enter, CTRL+X
Next, you'll want to edit the .env file:
nano .env
And paste the following in the .env:
## LINKACE CONFIGURATION
## Basic app configuration
# The application name is used internally and may not be changed
APP_NAME=LinkAce
COMPOSE_PROJECT_NAME=linkace
# The URL should be set if you notice issues with URLs generated by Laravel, which might be an issue with
# nginx configuration or the proxy you use.
APP_URL=http://localhost
# The environment is usually 'production' but may be changed to 'local' for development
APP_ENV=production
# The app key is generated later, please leave it blank
APP_KEY=
# Enable the debug more if you are running into issues or while developing
APP_DEBUG=false
# Set to true, if you are using a proxy that terminates SSL. Required to get the correct URLs for LinkAce
FORCE_HTTPS=false
# Indicates that the setup was completed and the app can be used now
SETUP_COMPLETED=false
# Set the time after a session expires automatically, in minutes. Default is 7 days.
SESSION_LIFETIME=10080
## Backup configuration
# Enable backups here
BACKUP_ENABLED=false
# Choose the destination of the backup. If you set up AWS S3 credentials below you may choose 's3' which is used
# as a synonym for AWS. Leave blank or set to 'local' if you want to store backups within /storage/app/backups.
BACKUP_DISK=s3
# Set to false if you do not want to be notified about successful or broken backups
BACKUP_NOTIFICATIONS=true
# The notification email may be used to get backup notifications
BACKUP_NOTIFICATION_EMAIL=your@email.com
# Maximum size of all backups in megabytes
BACKUP_MAX_SIZE=512
## Amazon Web Services (AWS) S3 configuration
# Define the key ID, the access key, the region and your bucket name here if you want to use AWS S3 for backups
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
## Mail configuration
MAIL_FROM_ADDRESS=your@email.com
MAIL_FROM_NAME=LinkAce
# Set the driver used for sending email here, default is `smtp`
MAIL_DRIVER=smtp
# Set the SMTP host and its port here
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
# Set the username used to connect to the SMTP server here
MAIL_USERNAME=null
# Set the password used to connect to the SMTP server here
MAIL_PASSWORD=null
# If your SMTP server uses encrypted connections, enable it here by setting the variable to `tls`
MAIL_ENCRYPTION=null
## Configuration of the database connection
## If you are using the standard configuration provided by LinkAce, you can leave all values except the password as
## they are. Docker will automatically create a linkace database and a corresponding user.
DB_CONNECTION=mysql
DB_HOST=db
DB_PORT=3306
DB_DATABASE=linkace
# Even if you use the standard configuration, please set a secure password here.
DB_USERNAME=linkace
DB_PASSWORD=ChangeThisToASecurePassword!
## Redis cache configuration
# Set the Redis connection here if you want to use it
REDIS_HOST=redis
REDIS_PASSWORD=ChangeThisToASecurePassword!
REDIS_PORT=6379
## You probably do not want to change any values blow. Only continue if you know what you are doing.
# Configure various driver
SESSION_DRIVER=file
LOG_CHANNEL=stack
BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_DRIVER=database
## Using Redis sockets
# If you want to use Redis via a Unix socket, you can remove the hash before the following lines, but remove one before
# the "CACHE_DRIVER" line above. Also, set a proper path to your Redis socket.
#CACHE_DRIVER=redis-socket
#SESSION_CONNECTION=redis-socket
#REDIS_SCHEME=unix
#REDIS_PATH=/path/to/redis.sock
Adjust the settings in here as necessary. Be sure to leave the APP_KEY
variable empty and then save and exit: CTRL+O, Enter, CTRL+X
In order to set the correct read/write permissions for the container to modify the .env file, you'll need to run the following command:
chmod 666 .env
Next we'll create the APP_KEY by entering the following into our terminal:
docker exec linkace_app_1 php artisan key:generate
Now that we've done all of this, we should be able to run the following:
docker-compose up -d
This should start the process of downloading the requisit images and then deploying the container.
Once the containers have come up, you can go to http://your-server-ip:81
Be sure to change the URL and port above to your server's actual IP and the port you declared in the docker-compose above.
You can go through the setup process of connecting to the database and setting up the user account.
NOTE: At the time of creating this tutorial, only a single user account is an option. They are planning to add multi-user support in version 2. Source