-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
compose.yaml
58 lines (53 loc) · 1.7 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
services:
postgresql:
build: images/postgresql
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
POSTGRES_HOST_AUTH_METHOD: password # TODO: See how to support scram-sha-256 in go
POSTGRES_USER_DAEMON: daemon
POSTGRES_PASSWORD_DAEMON: password
POSTGRES_USER_WEBSITE: website
POSTGRES_PASSWORD_WEBSITE: password
ports:
- "5432:5432"
volumes:
- postgres:/var/lib/postgresql/data # Persist data
- ./images/postgresql/fixtures:/docker-entrypoint-initdb.d # Import fixtures
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
# The golang daemon that will process incoming php files.
# We do not have to use the `daemon.service` file, as we can use the `command` directive to start the daemon.
daemon:
build:
context: .
dockerfile: images/golang/Dockerfile
depends_on:
postgresql:
condition: service_healthy # Ensure postgres is ready before starting the daemon
tmpfs:
- /in
command: app --dsn "postgres://daemon:password@postgresql/postgres?sslmode=disable"
php-fpm:
build: images/php-fpm
volumes:
- ./:/srv/http/phpshell.localhost/phpshell
- ./Basic_Framework:/srv/http/.common/Basic_Framework
tmpfs:
- /srv/http/phpshell.localhost/phpshell/cache
nginx:
image: nginx:alpine
ports:
- "80:80"
volumes:
- ./:/srv/http/phpshell.localhost/phpshell
- ./images/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
- ./Basic_Framework:/srv/http/.common/Basic_Framework
memcached:
image: memcached:alpine
volumes:
postgres: