docker compose down -v
wipes all your Appwrite instance data so I'm not sure if that's good to do.
Are you using the built in redis from the Appwrite install?
Yes, the redis service is running in docker, but I am using the code directly from the Appwrite github repository, not from an install. I ran docker compose build
and then start the containers normally.
So you followed this? https://github.com/appwrite/appwrite/blob/master/CONTRIBUTING.md#setup-from-source
Are you trying to modify the source code?
Yes exactly, I have a couple of changes, but not anything remotely associated with redis.
I can send the repo so you can see
Sure
Odd... If you didn't change the .env file or docker compose file, I don't know what could go wrong...
Hmm, I did change these files, I'll send the link
It will take a while because I didn't push my latest changes yet. I'll do it tomorrow, it's late here, but thanks for the quick reply! <:appwritepeepo:902865250427215882>
Here are the extent of my changes: https://github.com/appwrite/appwrite/compare/master...arijs:appwrite:allow-db-query-without-index Basically I removed the check for indexes on filters and sorting, and added my refine app in a docker container and added it to the traefik proxy It's worth noting that my fork is a little behind from appwrite upstream. My fork begins on this commit from Jan 17, it's after tag 1.2.0 but before tag 1.2.1:
commit e72c5511b6e71959bffb51261f5c3826838f2e6e
Merge: a35cf0b4c 4cc135e8e
Author: Christy Jacob <christyjacob4@gmail.com>
Date: Tue Jan 17 17:45:10 2023 +0530
Merge pull request #4654 from appwrite/fix-test-warnings
Fix null warnings
I don't know if it's related, but the docker-compose.yml
I'm using is almost equal the one from github, which has a disclaimer that it is a development targeted version and not recommended for production. I was going to ask this separately, but how do I make this compose file ready for production ?
Is this the only code related change you need to do?
So far, yes
haha, ok. So, for minor patches, I'd suggest running the normal Appwrite installation, but either:
- use
sed
to modify the file before appwrite runs - mount in a modified version of the file
And as for your custom app, I'd recommend putting a reverse proxy in front and using that to proxy to either appwrite or your app.
All of this is to try and keep the Appwrite stack close to the original as possible to make it easier to upgrade in the future.
your docker compose and .env seem fine though...let me download the code and try to run it
hmm wait...what are the specs on your server?
Here:
OS: Ubuntu 20.04 focal
Kernel: x86_64 Linux 5.4.0-136-generic
Uptime: 2d 23h 9m
Packages: 646
Shell: sh
Disk: 33G / 81G (42%)
CPU: Intel Xeon Gold 5218 @ 2x 2.295GHz
RAM: 1442MiB / 3893MiB
System information as of Fri 17 Feb 2023 04:52:59 PM UTC
System load: 0.0
Usage of /: 40.8% of 78.62GB
Memory usage: 30%
Swap usage: 0%
Processes: 233
Users logged in: 0
Before it was 2gb ram, but I upgraded it to 4gb it's a vps server
I can give this a try, but I have no idea how to do either of those changes, and I'm not afraid to search but this I don't know how to even begin Building the server from the code and starting it was the easiest way I could find
You should probably not port forward the redis port
I don't have an example of the sed
option right now, but here's an example of the 2nd option: https://github.com/appwrite/appwrite/blob/3e3eaaf20913657312a16413e9a5fe0df6ebf9a9/docker-compose.yml#L80
It seems like it is! It is related to the question I made before about the development docker-compose.yml
file. I searched the Docker docs and the port assigning in that file is only to the outside world, it is not required for communication between services, I didn't know that, this is the first time I'm using docker. But great deduction, awesome!
I'll explore this
[SOLVED] Redis: You can't write against a read only replica
Here's a sample of my docker-compose.override.yml
file for the sed
option:
version: '3'
services:
appwrite:
entrypoint:
- /bin/sh
- -c
command:
- sed -i -e "s/memory_limit', '512M/memory_limit', '1024M/g" /usr/src/code/app/init.php && php app/http.php -dopcache.preload=opcache.preload=/usr/src/code/app/preload.php
This uses sed
to update this line: https://github.com/appwrite/appwrite/blob/5d1ada46523a649f4c057d4c2ec1ad52fae60104/app/init.php#L15 before starting appwrite
Recommended threads
- Send Email Verification With REST
I am using REST to create a user on the server side after receiving form data from the client. After the account is successfully created i wanted to send the v...
- Use different email hosts for different ...
Hello, I have 2 projects and i want to be able to set up email templates in the projects. Both projects will have different email host configurations. I see ...
- Migrate from cloud to localhost
Hello everyone. I need to migrate my test project from cloud to localhost, however it seems that this is possible only if a self-hosted appwrite instance it's h...