Skip to content

Commit e7be60d

Browse files
authored
Fixes Docker setup (#161)
Added docker-compose.yml, which was ignored in .gitignore until now. Reorganized related files.
1 parent 45bd0d1 commit e7be60d

File tree

5 files changed

+47
-2
lines changed

5 files changed

+47
-2
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
.php_cs.cache
33
.phpunit.result.cache
44
composer.lock
5-
docker/docker-compose.yml
65
plugins/*
76
triggers/*
87
tests/coverage/*

docker/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local
1010

1111
# add custom PHP.ini settings
1212
RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"
13-
COPY ./includes/custom.ini /usr/local/etc/php/conf.d/custom.ini
13+
COPY ./custom.ini /usr/local/etc/php/conf.d/custom.ini
1414

1515
WORKDIR /var/www/html/
1616

File renamed without changes.

docker/docker-compose.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
version: '3'
2+
3+
services:
4+
arc2:
5+
build:
6+
context: .
7+
dockerfile: Dockerfile
8+
container_name: arc2
9+
volumes:
10+
- ./../:/var/www/html/
11+
depends_on:
12+
- db
13+
links:
14+
- db:mysql
15+
16+
db:
17+
image: mariadb:10.3.29
18+
container_name: db
19+
environment:
20+
MYSQL_DATABASE: arc2
21+
MYSQL_ROOT_PASSWORD: Pass123
22+
volumes:
23+
# server is empty at the start because it uses RAM to store data
24+
- data:/var/cache
25+
- data:/var/lib/mysql
26+
# for SQL commands to be run after the server starts
27+
- ./sql:/docker-entrypoint-initdb.d
28+
29+
phpmyadmin:
30+
image: phpmyadmin/phpmyadmin
31+
container_name: phpmyadmin
32+
links:
33+
- db:mysql
34+
ports:
35+
- 8002:80
36+
environment:
37+
MYSQL_USERNAME: root
38+
MYSQL_ROOT_PASSWORD: Pass123
39+
PMA_HOST: mysql
40+
UPLOAD_LIMIT: 2G
41+
42+
volumes:
43+
data:
44+
driver_opts:
45+
type: tmpfs
46+
device: tmpfs
File renamed without changes.

0 commit comments

Comments
 (0)