This repository has been archived by the owner on Jul 25, 2022. It is now read-only.
forked from vid/tc-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
100 lines (99 loc) · 3.47 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
version: "3.3"
# This is Docker-compose for development and staging. Its goals are to permit simple setup for a developer, where the only local tool required is docker-compose,
# as well as supporting the same talentcloud application Dockerfile for development and production.
services:
# talentcloud operations. Bootstraps the environment if required (no .setup file is present). Combines application logs into stderr and stout.
talentcloud-op:
build:
context: .
dockerfile: op/Dockerfile
image: talentcloud-op
container_name: talentcloud-op
working_dir: /opt/TalentCloud/var/www
# restart: always
volumes:
- "./etc/ssl:/opt/TalentCloud/etc/ssl"
- "./etc/php/php.ini:/usr/local/etc/php/conf.d/php.ini"
- "./TalentCloud/:/opt/TalentCloud/var/www"
- "logs:/var/log"
- "./op/Makefile:/opt/TalentCloud/var/www/Makefile:ro"
- "./op/op-assert.sh:/opt/TalentCloud/op-assert.sh:ro"
- "./op/.env.example:/opt/TalentCloud/.env.example:ro"
environment:
- "DB_PORT=5432"
- "DB_HOST=postgres"
# The TalentCloud application (PHP-FPM)
talentcloud:
# DEBUGGING normally this container can just use the image
# image: php:7.2-fpm-alpine3.7
build:
context: .
dockerfile: Dockerfile-talentcloud
#image: gctcntgc/talentcloud
# image: tc2_gctcntgc/talentcloud
# container_name: talentcloud
#working_dir: /var/www
working_dir: /opt/TalentCloud
# restart: always
volumes:
- "./wait-for-setup.sh:/opt/TalentCloud/wait-for-setup.sh"
- "./etc/php/php.ini:/usr/local/etc/php/conf.d/php.ini:rw"
- "./etc/php-fpm.d/zz-logs.conf:/usr/local/etc/php-fpm.d/zz-logs.conf:ro"
- "./TalentCloud/:/var/www"
- "logs:/var/log"
depends_on:
- talentcloud-op
environment:
- "DB_PORT=5432"
- "DB_HOST=postgres"
ports:
- "9000:9000"
# The web server (nginx)
nginx:
build:
context: .
dockerfile: Dockerfile-nginx
# image: nginx:1.13.9-alpine
container_name: nginx-setup
working_dir: /opt/TalentCloud
restart: always
volumes:
- "./etc/nginx/default.conf:/etc/nginx/conf.d/default.conf"
- "./etc/ssl:/etc/ssl"
- "./TalentCloud/:/var/www"
- "./wait-for-setup.sh:/opt/TalentCloud/wait-for-setup.sh"
- "logs:/var/log"
depends_on:
- talentcloud
links:
- talentcloud
ports:
- "80:80"
- "443:443"
# The database (Postgres)
postgres:
image: postgres:9.6-alpine
working_dir: /opt/TalentCloud
restart: always
volumes:
- "pgdata:/var/lib/postgresql/data"
- "./wait-for-setup.sh:/opt/TalentCloud/wait-for-setup.sh"
- "logs:/var/log"
environment:
- "POSTGRES_DB=talentcloud"
- "POSTGRES_USER=talentcloud"
- "POSTGRES_PASSWORD=talentcloud"
ports:
- "5434-5432"
# Adminer
adminer:
image: adminer
container_name: adminer
restart: always
links:
- postgres
ports:
- "8060:8080"
volumes:
pgdata:
logs: