-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
52 lines (46 loc) · 1.18 KB
/
docker-compose.yml
File metadata and controls
52 lines (46 loc) · 1.18 KB
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
# image: base on Dockerhub php image
version: '3.8'
services:
opencart:
image: websoft9dev/opencart:${APP_VERSION}
container_name: ${APP_NAME}
ports:
- ${APP_HTTP_PORT}:80
volumes:
- opencart:/var/www/html
restart: always
environment:
MYSQL_DATABASE: ${DB_MYSQL_NAME}
MYSQL_USER: ${DB_MYSQL_USER}
MYSQL_PASSWORD: ${DB_MYSQL_PASSWORD}
MYSQL_ROOT_PASSWORD: ${DB_MYSQL_PASSWORD}
MYSQL_HOST: ${DB_MYSQL_HOST}
links:
- mysql
command: bash -c "cat /my_cmd > /cmd.sh && chmod +x /cmd.sh && /cmd.sh"
configs:
- source: my_cmd
mysql:
image: mysql:${DB_MYSQL_VERSION}
container_name: ${APP_NAME}-db
restart: always
ports:
- ${DB_MYSQL_PORT}:3306
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
volumes:
- mysql_data:/var/lib/mysql
environment:
MYSQL_DATABASE: ${DB_MYSQL_NAME}
MYSQL_USER: ${DB_MYSQL_USER}
MYSQL_PASSWORD: ${DB_MYSQL_PASSWORD}
MYSQL_ROOT_PASSWORD: ${DB_MYSQL_PASSWORD}
networks:
default:
name: ${APP_NETWORK}
external: true
volumes:
opencart:
mysql_data:
configs:
my_cmd:
file: ./cmd.sh