This repository has been archived by the owner on Dec 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
89 lines (88 loc) · 2.96 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
version: '3'
services:
db:
image: postgres:9.6.15-alpine
restart: always
volumes:
- pgdata:/var/lib/postgresql/data
- ${DOCKERAPP_DATA_PATH:-./docker}/pgdata:/pgdata
networks:
- backend
ports:
- '5432:5432'
pharos:
image: registry.gitlab.com/aptrust/container-registry/pharos:${DOCKER_TAG_NAME:-latest}
restart: always
command: bundle exec puma -C config/puma.rb -e ${RAILS_ENV}
volumes:
- assets:/pharos/public
- ${DOCKERAPP_DATA_PATH:-./docker}/log:/pharos/log
depends_on:
- db
- migration
ports:
- 9292
networks:
- backend
- frontend
env_file:
- ".env"
migration:
image: registry.gitlab.com/aptrust/container-registry/pharos:${DOCKER_TAG_NAME:-latest}
# Note: Sleep 5 seconds before init db, so psql has time to start up.
command: /bin/bash -c "sleep 15 && bundle exec rake db:exists && time bundle exec rake db:migrate || (echo 'Init DB setup' && bundle exec rake db:setup && bundle exec rake pharos:setup)"
volumes:
- ${DOCKERAPP_DATA_PATH:-./docker}/log:/pharos/log
env_file:
- ".env"
depends_on:
- db
networks:
- backend
nginx-proxy-pharos:
image: registry.gitlab.com/aptrust/container-registry/nginx-proxy-pharos:${DOCKER_TAG_NAME:-latest}
restart: always
container_name: nginx-proxy-pharos
ports:
- "80:80"
- "443:443"
- 18080 # nginx_status port
# environment:
# - DEFAULT_HOST=docker1.aptrust.org
# - DHPARAM_GENERATION=false
volumes:
- /var/run/docker.sock:/tmp/docker.sock
- ${DOCKERAPP_DATA_PATH:-./docker}/nginx-proxy/certs:/etc/nginx/certs:ro
- ${DOCKERAPP_DATA_PATH:-./docker}/nginx-proxy/html:/usr/share/nginx/html:rw
- ${DOCKERAPP_DATA_PATH:-./docker}/nginx-proxy/:/var/log/nginx/:rw
- ./docker/nginx-proxy/pharosstatic_location:/etc/nginx/vhost.d/${VIRTUAL_HOST}_location
- ./docker/nginx-proxy/graylog_nginx.conf:/etc/nginx/conf.d/graylog_nginx.conf
- ./docker/nginx-proxy/proxy_settings.conf:/etc/nginx/conf.d/proxy_settings.conf
- ${DOCKERAPP_DATA_PATH:-./docker}/nginx-proxy/vhost.d:/etc/nginx/vhost.d
- assets:/etc/share/nginx/html/pharos
labels:
- "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy"
networks:
- frontend
letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
restart: always
depends_on:
- nginx-proxy-pharos
environment:
- NGINX_PROXY_CONTAINER=nginx-proxy-pharos
- DEBUG=false
networks:
- frontend
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- assets:/usr/share/nginx/html/pharos:rw
- ${DOCKERAPP_DATA_PATH:-./docker}/nginx-proxy/certs:/etc/nginx/certs:rw
- ${DOCKERAPP_DATA_PATH:-./docker}/nginx-proxy/html:/usr/share/nginx/html:rw
- ${DOCKERAPP_DATA_PATH:-./docker}/nginx-proxy/vhost.d:/etc/nginx/vhost.d:rw
networks:
frontend:
backend:
volumes:
pgdata:
assets: