-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
executable file
·84 lines (79 loc) · 1.7 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
77
78
79
80
81
82
83
84
version: '3'
services:
#Front Service
docuco_front:
build:
context: ./front
dockerfile: Dockerfile
container_name: docuco_front
restart: unless-stopped
env_file:
- .env
volumes:
- ./front:/app
tty: true
ports:
- '4200:4200'
command: >
bash -c "npm install && npm start"
environment:
SERVICE_NAME: front
SERVICE_TAGS: dev
#Api Service
docuco_api:
build:
context: ./api
dockerfile: Dockerfile
image: digitalocean.com/php
container_name: docuco_api
restart: unless-stopped
env_file:
- .env
tty: true
environment:
SERVICE_NAME: api
SERVICE_TAGS: dev
XDEBUG_CONFIG: remote_host=host.docker.internal remote_port=9000 remote_enable=1
working_dir: /var/www
volumes:
- ./api:/var/www
- ./api/docker/php/local.ini:/usr/local/etc/php/conf.d/local.ini
networks:
- api-network
#Nginx Service
docuco_webserver:
image: nginx:alpine
container_name: docuco_webserver
restart: unless-stopped
env_file:
- .env
tty: true
ports:
- "8000:80"
- "443:443"
volumes:
- ./api:/var/www
- ./api/docker/nginx/conf.d/:/etc/nginx/conf.d/
networks:
- api-network
#PostgresSQL Service
docuco_db:
image: postgres:11.1-alpine
container_name: docuco_db
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_DATABASE}
ports:
- '${DB_PORT}:${DB_PORT}'
volumes:
- ./api/docker/postgres/:/docker-entrypoint-initdb.d/
networks:
- api-network
#Docker Networks
networks:
api-network:
driver: bridge
#Volumes
volumes:
dbdata:
driver: local