ci(docker): attempt to fix production deploy, with env management

This commit is contained in:
Amruth Pillai
2022-03-05 14:36:38 +01:00
parent a4983ac6bc
commit 37f0ab3bca
5 changed files with 29 additions and 199 deletions

View File

@ -5,35 +5,35 @@ services:
image: postgres
container_name: postgres
ports:
- '5432:5432'
- 5432:5432
env_file: .env
volumes:
- ./scripts/database/initialize.sql:/docker-entrypoint-initdb.d/initialize.sql
- pgdata:/var/lib/postgresql/data
# Development
# app:
# build: .
# container_name: app
# depends_on:
# - postgres
# ports:
# - '3000:3000'
# - '3100:3100'
# env_file: .env
# environment:
# NODE_ENV: development
# POSTGRES_HOST: postgres
app:
build: .
container_name: app
links:
- postgres
ports:
- 3000:3000
- 3100:3100
env_file: .env
environment:
NODE_ENV: development
POSTGRES_HOST: postgres
# Production
# app:
# image: amruthpillai/reactive-resume
# container_name: app
# depends_on:
# links:
# - postgres
# ports:
# - '3000:3000'
# - '3100:3100'
# - 3000:3000
# - 3100:3100
# env_file: .env
# environment:
# NODE_ENV: production