-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
77 lines (74 loc) · 2.43 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
volumes:
mariadb:
driver: local
networks:
sandboxer:
driver: bridge
services:
setup: # A one-time-run setup service for when starting containers. Also, this is the service name which should only be unique to this docker-compose project
container_name: sandboxer-setup # The name of the container. Should be unique, possibly prefixed to avoid potential collisions with other containers outside of the project
command: /bin/sh /phpmyadmin.sh
build:
context: ./
dockerfile: setup.dockerfile
image: sandboxer-setup
volumes:
- ./www:/srv/sandboxer
restart: no
db:
container_name: sandboxer-db
image: mariadb:11.2.4
restart: always
environment:
MYSQL_ROOT_PASSWORD: superduperroot
MYSQL_USER: sandboxer
MYSQL_PASSWORD: localuserpassword
ports:
- "3306:3306"
volumes:
- ./dbdata:/var/lib/mysql
- ./iedata:/srv/iedata
networks:
sandboxer:
php:
container_name: sandboxer-php # Name of the container; this is already prefixed with "sandboxer". E.g. run "docker ps" to see what I mean
build:
context: ./
dockerfile: ./php8.2-fpm.dockerfile
image: sandboxer-php # Name of the image to build
expose:
- "9000" # Expose a port on the virtual network (sandboxer), but do not expose it on the HOST
networks:
- sandboxer
volumes:
- ./www:/srv/sandboxer # Mount a "www" directory on the host that is shared with the web server. E.g. Apache or Nginx
- ./log/php:/var/log/php82 # Mount the log file directory to a place on host so we can access the log files
environment:
PHP_MEMORY_LIMIT: 1024M
PHP_UPLOAD_LIMIT: 512M
PHP_DISPLAY_ERRORS: 1
MYSQL_ROOT_PASSWORD: superduperroot
MYSQL_DATABASE: sandbox
MYSQL_USER: sandboxer
MYSQL_PASSWORD: localuserpassword
restart: unless-stopped
apache2:
container_name: sandboxer-apache2
ports:
- "80:80" # Expose a port on the HOST network. Note. This is needed for the port to be accessible in a browser. E.g. Via "http://sandboxer.localhost"
- "443:443"
networks:
- sandboxer
build:
context: ./
dockerfile: apache2.dockerfile
image: sandboxer-apache2
volumes:
- ./www:/srv/sandboxer
- ./log/apache2:/var/log/apache2
restart: unless-stopped
depends_on:
db:
condition: service_started
php:
condition: service_started