LinkAce
LinkAce copied to clipboard
Local setup using no env file
Followed setup located here: https://www.linkace.org/docs/v1/setup/setup-with-docker/advanced-configuration/
Followed steps in this section on that page: "Using Docker environment variables instead of the .env file" Step1: Removed volume mount of file Step2: Added env variables to compose file Step3: Step3a: Done Step3b: Done Step3c: Done Step4: Using MariaDB
Initial launch successful, however
URL: http://myLocalIP:8187/setup/requirements
PHP version >= 7.4.0 : Checkmark PHP Extension: BCMath : Checkmark PHP Extension: Ctype : Checkmark PHP Extension: JSON : Checkmark PHP Extension: Mbstring : Checkmark PHP Extension: OpenSSL : Checkmark PHP Extension: PDO : Checkmark PHP Extension: Tokenizer : Checkmark PHP Extension: XML : Checkmark .env file is present and writable : SadPanda /storage and /storage/logs directories are writable : Checkmark
Enter the boring stuff:
services:
linkace-db:
image: mariadb:10.7
container_name: linkace-db
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_bin
environment:
PGID: 1000
PUID: 1000
TZ: "Earth"
UMASK_SET: 002
MYSQL_ROOT_PASSWORD: ChangeThisToASecurePassword!
MYSQL_USER: linkace
MYSQL_PASSWORD: ChangeThisToASecurePassword!
MYSQL_DATABASE: linkace
labels:
- "traefik.enable=false"
restart: unless-stopped
volumes:
- /home/docker/nonVolumes/linkace-db:/var/lib/mysql
networks:
- mxprod01io
linkace-app:
image: linkace/linkace:simple
container_name: linkace-app
depends_on:
- linkace-db
environment:
PGID: 1000
PUID: 1000
TZ: "Earth"
UMASK_SET: 002
APP_KEY: base64:UpNqL+sGLU6ckAzczF3QcFsrQzv/jHFypRp8fGnNX6s=
## Configuration of the database connection
## Attention: Those settings are configured during the web setup, please do not modify them now.
# Set the database driver (mysql, pgsql, sqlsrv, sqlite)
DB_CONNECTION: mysql
DB_HOST: linkace-db
DB_PORT: 3306
DB_DATABASE: linkace
DB_USERNAME: linkace
DB_PASSWORD: ChangeThisToASecurePassword!
labels:
- "traefik.enable=false"
restart: unless-stopped
ports:
- "0.0.0.0:8187:80"
volumes:
- /home/docker/nonVolumes/linkace-app:/app/storage/logs"
networks:
- mxprod01io
networks:
mxprod01io:
external: true
Is there a env variable to let the app know that we are choosing this option and skip check for file?
Posting this as i didn't see any work around already posted. I put a dummy .env file as a mount with BLANKFILE inside the file. Allowed me to finish setup.
I was wondering the same: I'm running this on Kubernetes and it feels weird to mount configuration files.
Posting this as i didn't see any work around already posted. I put a dummy .env file as a mount with BLANKFILE inside the file. Allowed me to finish setup.
Does this really work?! :)
Anyway I'm loving this app!
Container is still up and running. So workaround works. Shall see in the next server reboot.
I can confirm, you have to mount a writable .env file just for initial checks and setup. Afterwards app works without any file mounted. That .env can be just a BLANKFILE.
I need something like this:
- /var/lib/docker/volumes/linkace_linkace_env/_data/.env:/app/.env
But seems a bit odd, must be better ways to setup the app.
Did you find a way?
If I mount a blank file to the .env path, it gives me an internal server error
Note: the .env file is not in the same folder as the docker-compose.yml
So here is my Docker compose file
services:
linkace-db:
image: mariadb:10.7
container_name: linkace-db
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_bin
environment:
PGID: 1000
PUID: 1000
TZ: "America/Phoenix"
UMASK_SET: 002
MYSQL_ROOT_PASSWORD: ChangeThisToASecurePassword!
MYSQL_USER: linkace
MYSQL_PASSWORD: ChangeThisToASecurePassword!
MYSQL_DATABASE: linkace
labels:
- "traefik.enable=false"
restart: unless-stopped
ports:
- "3308:3306"
volumes:
- /home/docker/nonVolumes/linkace-db:/var/lib/mysql
networks:
- linkace-net
linkace-app:
image: linkace/linkace:simple
container_name: linkace-app
depends_on:
- linkace-db
environment:
PGID: 1000
PUID: 1000
TZ: "America/Phoenix"
UMASK_SET: 002
APP_KEY: base64:UpNqL+sGLU6ckAzczF3QcFsrQzv/jHFypRp8fGnNX6s=
## Configuration of the database connection
## Attention: Those settings are configured during the web setup, please do not modify them now.
# Set the database driver (mysql, pgsql, sqlsrv, sqlite)
DB_CONNECTION: mysql
DB_HOST: linkace-db
DB_PORT: 3308
DB_DATABASE: linkace
DB_USERNAME: linkace
DB_PASSWORD: ChangeThisToASecurePassword!
labels:
- "traefik.enable=false"
restart: unless-stopped
ports:
- "8187:80"
volumes:
- /home/docker/nonVolumes/linkace-app/env/.env:/app/.env
- /home/docker/nonVolumes/linkace-app/app:/app/storage/logs"
networks:
- linkace-net
networks:
linkace-net:
external: true```
So here is my Docker compose file
`--- services: linkace-db: image: mariadb:10.7 container_name: linkace-db command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_bin environment: PGID: 1000 PUID: 1000 TZ: "America/Phoenix" UMASK_SET: 002 MYSQL_ROOT_PASSWORD: ChangeThisToASecurePassword! MYSQL_USER: linkace MYSQL_PASSWORD: ChangeThisToASecurePassword! MYSQL_DATABASE: linkace labels: - "traefik.enable=false" restart: unless-stopped ports: - "3308:3306" volumes: - /home/docker/nonVolumes/linkace-db:/var/lib/mysql networks: - linkace-net
linkace-app: image: linkace/linkace:simple container_name: linkace-app depends_on: - linkace-db environment: PGID: 1000 PUID: 1000 TZ: "America/Phoenix" UMASK_SET: 002 APP_KEY: base64:UpNqL+sGLU6ckAzczF3QcFsrQzv/jHFypRp8fGnNX6s= ## Configuration of the database connection ## Attention: Those settings are configured during the web setup, please do not modify them now. # Set the database driver (mysql, pgsql, sqlsrv, sqlite) DB_CONNECTION: mysql DB_HOST: linkace-db DB_PORT: 3308 DB_DATABASE: linkace DB_USERNAME: linkace DB_PASSWORD: ChangeThisToASecurePassword! labels: - "traefik.enable=false" restart: unless-stopped ports: - "8187:80" volumes: - /home/docker/nonVolumes/linkace-app/env/.env:/app/.env - /home/docker/nonVolumes/linkace-app/app:/app/storage/logs" networks: - linkace-net
networks: linkace-net: external: true`
thanks
next time use ``` to create a multiline code ;)
updated thank you. its still early