Created
February 24, 2017 06:58
-
-
Save lu911/264f949be26d3b69952bc42ff9e35b72 to your computer and use it in GitHub Desktop.
ddingdon docker-compose
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
postgres: | |
restart: always | |
image: postgres:9.4 | |
hostname: postgres | |
container_name: pg | |
ports: | |
- "5432:5432" | |
volumes: | |
- '/opt/data/pg:/var/lib/postgresql/data' | |
environment: | |
- POSTGRES_USER=AAAA | |
- POSTGRES_PASSWORD=AAAA | |
- POSTGRES_DB=AAAA | |
redis: | |
restart: always | |
image: redis:3.2 | |
hostname: redis | |
container_name: redis | |
command: redis-server --appendonly yes | |
ports: | |
- "6379:6379" | |
volumes: | |
- '/opt/data/redis:/data' | |
api: | |
restart: always | |
image: api:latest | |
container_name: api | |
env_file: | |
- ./envs/service.env | |
environment: | |
- APP_ENV=api | |
- VIRTUAL_HOST=api.localhost | |
- VIRTUAL_PROTO=uwsgi | |
depends_on: | |
- postgres | |
- redis | |
admin: | |
restart: always | |
image: admin:latest | |
container_name: admin | |
env_file: | |
- ./envs/service.env | |
environment: | |
- APP_ENV=admin | |
- VIRTUAL_HOST=admin.localhost | |
depends_on: | |
- postgres | |
- redis | |
nginx: | |
restart: always | |
image: jwilder/nginx-proxy | |
container_name: nginx | |
ports: | |
- "80:80" | |
volumes: | |
- /var/run/docker.sock:/tmp/docker.sock:ro | |
networks: | |
default: | |
external: | |
name: proxy-tier |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment