-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.asset_server.yml
121 lines (115 loc) · 3.97 KB
/
docker-compose.asset_server.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# {'Compose file format': 3.7, 'Docker Engine release': 18.06.0*} (0x0)
version: '3.7'
# Services collectively make up a distributed application. (0x1)
services:
# ---------------------------------------------------------------------------------------------------------------{0x0}
rabbit_manager:
tty: true
build:
context: '.'
dockerfile: './applications/rabbitmq_manager/Dockerfile'
environment:
_SERVICE_NAME: 'rabbit_manager'
RABBITMQ_ERLANG_COOKIE: 'secret string'
RABBITMQ_NODENAME: rabbit_manager
volumes:
- './applications/rabbitmq_manager/rabbitmq.config:/etc/rabbitmq/rabbitmq.config'
- './applications/rabbitmq_manager/definitions.json:/etc/rabbitmq/definitions.json'
ports:
- "5672:5672"
- "15672:15672"
- "25672:25672"
# ---------------------------------------------------------------------------------------------------------------{0x1}
nginx:
tty: true
build:
context: '.'
dockerfile: './applications/nginx/Dockerfile'
environment:
_SERVICE_NAME: "nginx"
ports:
- "80:80"
volumes:
- 'nexus_volume:/v'
- './applications/nginx/nl.nginx:/etc/nginx/nginx.conf'
depends_on:
- asset_server
- pgadmin4
- rabbit_manager
# ---------------------------------------------------------------------------------------------------------------{0x2}
asset_server:
tty: true
container_name: asset_server
build:
context: '.'
dockerfile: './applications/asset_server/Dockerfile'
ports:
- "80:80"
volumes:
- 'nexus_volume:/v'
- './:/quasar_source'
- './applications/asset_server/src/www.conf:/etc/php7/php-fpm.d/www.conf'
environment:
_SERVICE_NAME: 'asset_server'
DATABASE_URL: 'pgsql://postgres:password@postgres_server:5432/postgres'
# ---------------------------------------------------------------------------------------------------------------{0x3}
postgres_server:
tty: true
container_name: postgres_server
hostname: postgres
image: postgres
ports:
- "5432:5432"
volumes:
- '/Users/utarsuno/code/quasar_source/var/db/postgres:/var/lib/postgresql/data'
environment:
POSTGRES_USER: 'postgres'
POSTGRES_DB: 'postgres'
POSTGRES_PASSWORD: 'password'
# ---------------------------------------------------------------------------------------------------------------{0x4}
# https://hub.docker.com/r/dpage/pgadmin4/
# https://info.crunchydata.com/blog/easy-postgresql-10-and-pgadmin-4-setup-with-docker
# TODO: env_var like how {https://github.com/khezen/compose-postgres/blob/master/docker-compose.yml} does it
pgadmin4:
container_name: pgadmin4
hostname: pgadmin4
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: '[email protected]'
PGADMIN_DEFAULT_PASSWORD: 'admin'
PGADMIN_ADMIN_PORT: '80'
PGADMIN_LISTEN_ADDRESS: '0.0.0.0'
SCRIPT_NAME: '/pgadmin4'
DEBUG: 'True'
volumes:
- '/Users/utarsuno/code/quasar_source/var/pgadmin/pgadmin:/root/.pgadmin'
- '/Users/utarsuno/code/quasar_source/var/pgadmin/lib:/var/lib/pgadmin'
- '/Users/utarsuno/code/quasar_source/applications/pgadmin/config.py:/pgadmin4/config.py'
# --------------------------------------------------------------------------------------------------------------------
networks:
default:
external:
name: nexus_network
volumes:
nexus_volume:
external: true
postgres_data:
external: true
# jenkins-log:
# external: true
# jenkins-data:
# external: true
# Manages automated jobs, builds, etc.
# jenkins:
#hostname: jenkins
# build:
# context: .
# dockerfile: ./applications/jenkins/Dockerfile
# environment:
# _SERVICE_NAME: "jenkins"
# JAVA_OPTS: "-Xmx3072m" # 3GB memory.
# JENKINS_OPTS: "--logfile=/var/log/jenkins/jenkins.log"
# tty: true
# volumes:
# - jenkins-log:/var/log/jenkins
# - jenkins-data:/var/jenkins_home