-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
133 lines (124 loc) · 3.3 KB
/
compose.yaml
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# ----------------------------------------------------------------
# WHAT IS THIS FILE FOR?
# https://nsustain.com = Flarum
# https://BeeMovr.nsustain.com = BeeMovr
# https://GoodLifeFarms.nsustain.com = Good Life Farms
# ----------------------------------------------------------------
# We use Compose Version 3.3 because it's the recommended version
# by Kompose, which automatically converts Compose files into
# Kubernetes objects.
# Source:
# https://kompose.io/conversion/#version-table
version: "3.3"
services:
flarum:
image: nsustain/flarum:latest
container_name: flarum
# Always restart the container, even after reboot
restart: unless-stopped
pull_policy: never
build:
context: ./nsustain.com/src/docker
dockerfile: Dockerfile.flarum
depends_on:
- mariadb
expose:
- 9000 # used by PHP-FPM
networks:
- back-end
volumes:
# These are the data files for the container.
# Location of these files:
# /var/lib/docker/volumes/...
- flarum-data:/var/www/html/flarum
env_file:
- ./nsustain.com/src/docker/.env_flarum
beemovr:
container_name: beemovr
build:
context: ./BeeMovr
dockerfile: Dockerfile.beemovr
restart: unless-stopped
expose:
- 3000 # used by Node (pnpm)
networks:
- back-end
volumes:
- beemovr-database:/app/database
goodlifefarms:
container_name: goodlifefarms
build:
context: ./GoodLifeFarms
dockerfile: Dockerfile.goodlifefarms
restart: unless-stopped
networks:
- back-end
expose:
- 3000 # used by Node (pnpm)
nginx:
image: nsustain/nginx:latest
container_name: nginx
build:
context: .
dockerfile: Dockerfile.nginx
depends_on:
- flarum
- beemovr
- goodlifefarms
restart: unless-stopped
pull_policy: never
ports:
- 80:80
- 443:443
networks:
- back-end
volumes:
- flarum-data:/var/www/html/flarum
- ./configs_nginx/nginx.conf:/etc/nginx/nginx.conf
# When you first run our image, these volumes will
# be empty. However, if you'd like to set up https / SSL,
# these volumes will be used for storing the certificates.
- letsencrypt-data:/etc/letsencrypt
# certbot uses lock-files system for its internal functions.
# Source:
# https://eff-certbot.readthedocs.io/en/stable/using.html#where-certs
- letsencrypt-lockfiles:/var/lib/letsencrypt
entrypoint:
- nginx
command:
- -g
- daemon off;
mariadb:
image: mariadb:latest
container_name: mariadb
restart: unless-stopped
pull_policy: always
expose:
- 3306 # used by MariaDB
networks:
- back-end
volumes:
- mariadb-data:/var/lib/mysql
env_file:
- ./nsustain.com/src/docker/.env_mariadb
volumes:
flarum-data:
external: true
name: flarum-data
letsencrypt-data:
external: true
name: letsencrypt-data
letsencrypt-lockfiles:
external: true
name: letsencrypt-lockfiles
mariadb-data:
external: true
name: mariadb-data
beemovr-database:
external: true
name: beemovr-database
# "The presence of these objects is sufficient to define them"
# Source:
# https://docs.docker.com/compose/compose-file/
networks:
back-end: {}