-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.local.yml
More file actions
77 lines (69 loc) · 2.06 KB
/
docker-compose.local.yml
File metadata and controls
77 lines (69 loc) · 2.06 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Update file with correct Docker image paths (from file .gitlab-ci.yml), map folders, port mapping
# map port from Docker host to [container](https://docs.docker.com/compose/compose-file/).
# If you going to have access from "world" to stage you should define public port.
# For example: we want to public nginx to world, to do this add port-mapping instruction in service nginx,
# but you should use variable "NGINX" instead certain TCP port. By default port will generated from range 20000-30000.
# Generate a random port (s) is performed in Ansible-playbook deploy_staging.yml.
# See documentation for deploy_staging.yml for more information.
version: "3.9"
services:
# NGINX container
maincard:
container_name: ${APP_NAME}
restart: unless-stopped
build:
context: .docker/local/nginx
dockerfile: Dockerfile
restart: 'unless-stopped'
ports:
- 88:80
volumes:
- .:/var/www/${APP_NAME}
- .docker/local/nginx/logs:/var/log/nginx
links:
- php
depends_on:
- mysql
networks:
- maincard_network
# PHP FastCGI Process Manager container
php:
container_name: ${APP_NAME}-php
restart: unless-stopped
links:
- mysql
build:
context: .
dockerfile: .docker/local/php/Dockerfile
args:
- APP_ENV=${APP_ENV}
- APP_NAME=${APP_NAME}
volumes:
- .:/var/www/${APP_NAME}
- .docker/local/php/php.ini:/usr/local/etc/php/php.ini
networks:
- maincard_network
# MySQL container
mysql:
container_name: ${APP_NAME}-mysql
restart: unless-stopped
build:
context: .docker/local/mysql
dockerfile: Dockerfile
volumes:
- mysql_data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
ports:
- 3310:3306
networks:
- maincard_network
volumes:
mysql_data:
driver: local
networks:
maincard_network:
driver: bridge