forked from pixelfed/pixelfed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
87 lines (80 loc) · 1.81 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
---
version: '3'
# In order to set configuration, please use a .env file in
# your compose project directory (the same directory as your
# docker-compose.yml), and set database options, application
# name, key, and other settings there.
# A list of available settings is available in .env.example
#
# The services should scale properly across a swarm cluster
# if the volumes are properly shared between cluster members.
services:
## App and Worker
app:
# Comment to use dockerhub image
image: quay.io/zknt/pixelfed:latest
# build:
# context: ./contrib/docker
# dockerfile: Dockerfile.fpm
restart: unless-stopped
env_file:
- .env
volumes:
- app-storage:/var/www/storage
- app-bootstrap:/var/www/bootstrap
- "./.env.docker:/var/www/.env"
networks:
- external
- internal
ports:
- "8124:80"
depends_on:
- db
- redis
worker:
image: quay.io/zknt/pixelfed:latest
# build:
# context: ./contrib/docker
# dockerfile: Dockerfile.fpm
restart: unless-stopped
env_file:
- .env
volumes:
- app-storage:/var/www/storage
- app-bootstrap:/var/www/bootstrap
networks:
- external
- internal
entrypoint: /worker-entrypoint.sh
depends_on:
- db
- redis
## DB and Cache
db:
image: mariadb:jammy
restart: unless-stopped
networks:
- internal
command: --default-authentication-plugin=mysql_native_password
env_file:
- .env
volumes:
- "./db:/var/lib/mysql"
redis:
image: redis:5-alpine
restart: unless-stopped
env_file:
- .env
volumes:
- "redis-data:/data"
networks:
- internal
volumes:
redis-data:
app-storage:
app-bootstrap:
networks:
internal:
internal: true
external:
driver: bridge