Add script to build and run on ec2

Remove postgres container because it is not used
pull/1/head
DustyP 6 years ago
parent a17e1de4d0
commit b055336432

@ -1,27 +1,27 @@
version: "3" version: "3"
services: services:
goff-db: # goff-db:
image: postgres # image: postgres
ports: # ports:
- "5432:5432" # - "5432:5432"
volumes: # volumes:
- "${PWD}/postgres.conf:/etc/postgresql/postgresql.conf" # - "${PWD}/postgres.conf:/etc/postgresql/postgresql.conf"
- "goff-db:/var/lib/postgresql/data:rw" # - "goff-db:/var/lib/postgresql/data:rw"
env_file: ${PWD}/.env # env_file: ${PWD}/.env
goff: goff:
build: build:
context: . context: .
dockerfile: "${PWD}/Dockerfile" dockerfile: "${PWD}/Dockerfile"
env_file: ${PWD}/.env env_file: ${PWD}/.env
depends_on: # depends_on:
- goff-db # - goff-db
environment: environment:
- DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}?sslmode=disable - DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}?sslmode=disable
links: # links:
- goff-db:goff.db # - goff-db:goff.db
volumes: #volumes:
goff-db: # goff-db:
external: true # external: true

@ -0,0 +1,4 @@
#!/bin/bash
/usr/local/bin/docker-compose build || exit
/usr/local/bin/docker-compose up
Loading…
Cancel
Save