change postgres to docker
This commit is contained in:
		
							
								
								
									
										31
									
								
								docker/docker-compose.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								docker/docker-compose.yml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,31 @@
 | 
			
		||||
# Use postgres/postgres user/password credentials
 | 
			
		||||
services:
 | 
			
		||||
 | 
			
		||||
  db:
 | 
			
		||||
    image: postgres
 | 
			
		||||
    restart: always
 | 
			
		||||
    # set shared memory limit when using docker-compose
 | 
			
		||||
    shm_size: 128mb
 | 
			
		||||
    # or set shared memory limit when deploy via swarm stack
 | 
			
		||||
    #volumes:
 | 
			
		||||
    #  - type: tmpfs
 | 
			
		||||
    #    target: /dev/shm
 | 
			
		||||
    #    tmpfs:
 | 
			
		||||
    #      size: 134217728 # 128*2^20 bytes = 128Mb
 | 
			
		||||
    environment:
 | 
			
		||||
      POSTGRES_PASSWORD: postgres
 | 
			
		||||
    ports:
 | 
			
		||||
      - 5432:5432
 | 
			
		||||
 | 
			
		||||
  adminer:
 | 
			
		||||
    image: adminer
 | 
			
		||||
    restart: always
 | 
			
		||||
    ports:
 | 
			
		||||
      - 8081:8080
 | 
			
		||||
 | 
			
		||||
  cache:
 | 
			
		||||
    image: redis
 | 
			
		||||
    restart: always
 | 
			
		||||
    ports:
 | 
			
		||||
      - 6379:6379
 | 
			
		||||
    command: redis-server --save 60 1 --loglevel warning
 | 
			
		||||
		Reference in New Issue
	
	Block a user