Comments (13)
If you are going to edit the README because of the nginx-fpm example maybe you should replace the
links:
- app
flag in flavor of version 3 of the compose file.
Quote:
The --link flag is a legacy feature of Docker. It may eventually be removed. Unless you absolutely need to continue using it, we recommend that you use user-defined networks to facilitate communication between two containers instead of using --link. One feature that user-defined networks do not support that you can do with --link is sharing environmental variables between containers. However, you can use other mechanisms such as volumes to share environment variables between containers in a more controlled way.
Ref: https://docs.docker.com/compose/compose-file/#links
Maybe something like:
version: '3'
services:
db:
image: mariadb
restart: always
volumes:
- db:/var/lib/mysql
environment:
- MYSQL_USER=friendica
- MYSQL_PASSWORD=
- MYSQL_DATABASE=friendica
- MYSQL_RANDOM_ROOT_PASSWORD=yes
networks:
main:
aliases:
- db
app:
image: friendica/server:fpm
restart: always
volumes:
- friendica:/var/www/html
environment:
- MYSQL_HOST=db
- MYSQL_PORT=3306
- MYSQL_USER=friendica
- MYSQL_PASSWORD=
- MYSQL_DATABASE=friendica
- [email protected]
hostname: friendica.local
depends_on:
- db
networks:
main:
aliases:
- app
web:
image: nginx
ports:
- 8080:80
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
volumes_from:
- app
restart: always
networks:
main:
aliases:
- web
volumes:
db:
friendica:
networks:
main:
from docker.
from docker.
IMHO yes. Thx!
from docker.
Did you create a local nginx.conf
before starting?
from docker.
No (I figured that's where the mistake was). If this is a prerequisite maybe it should be mentioned in the README :)
from docker.
Hm.. There is a sentence about looking for examples in the examples folder.
But I will write it more clear / prominent :-)
from docker.
Well - I first assumed it will run out of the box like the apache example without any further configuration.
A docker compose example YAML file tempts you to try it out quickly :)
from docker.
I will change the link to the custom network linking, but I don't want to change the version to "3" because there are currently a lot of version 2 docker-compose configs out there.
When you make a nginx.conf file with the help of one of the examples and start it with the given docker-compose file, is the docker environment working?
from docker.
There is a new description in the README for using this example.
from docker.
Works perfect :)
But the compose example from README differs from .examples/docker-compose/insecure/mariadb-cron-smtp/fpm/docker-compose.yml
or was that on purpose?
from docker.
Thanks for the feedback :-)
Yes, because the example-files are more like a "template" for everybody. So there are more environment variables to consider and the db-credentials are in a separated file.
The docker-compose examples in the README are for "quick&dirty" setups.
In the near future, I will make docker-compose files with traefik as a ACME(Let's encrypt) and Reverse Proxy (=> secure docker-compose files ;-) )
from docker.
@jaltek Can I close this issue? Is the answer for the README suitable for you?
from docker.
I have the same problem; I'm new with docker and I don't how to fix please help
ERROR: for firstproject-webserver Cannot start service webserver: OCI runtime create failed: container_linux.go:345: starting container process caused "process_linux.go:424: container init caused "rootfs_linux.go:58: mounting \"/c/firstproject/phpdocker/nginx/nginx.conf\" to rootfs \"/mnt/sda1/var/lib/docker/overlay2/ccb70cb832f49a81d583eb3e389371e01865cb6ab9ae7dd4a923d4f434a9361c/merged\" at \"/mnt/sda1/var/lib/docker/overlay2/ccb70cb832f49a81d583eb3e389371e01865Creating firstproject-php-fpm ... done
u trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected tCreating firstproject-mysql ... done
docker-compose.txt
from docker.
Related Issues (20)
- logging HOT 2
- Cron job with k3s acting funny HOT 2
- Error: GNU Multiple Precision PHP module required but not installed. HOT 3
- E_WARNING: session_write_close() with Redis HOT 2
- How to check cron jobs? HOT 1
- db.env variables are incorrect HOT 2
- ImagickException: Unable to set the image format HOT 6
- Link in README.md is broken HOT 1
- Wrong sitename and description on Friendica Directory https://dir.friendica.social/ HOT 1
- Healthcheck HOT 3
- Can't turn off STARTTLS for msmtp
- Lots of CORS errors when using the insecure image HOT 4
- Help on running Friendica on Kubernetes HOT 2
- Issues with HTTPS HOT 9
- FRIENDICA_UPGRADE cannot be false on rc image HOT 2
- Reduce PHP error_reporting scope in container HOT 8
- Failed to open stream: No such file or directory in /var/www/html/vendor/composer/ClassLoader.php on line 444 HOT 1
- PHP Module IntlChar is missing HOT 8
- Improve documentation on attaching MySQL database HOT 1
- 2024.03-rc image is missing HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker.