-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
106 lines (99 loc) · 2.89 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
version: "3.7"
services:
# tell us app
app:
image: "tell-us:development"
# use if you just want to keep the container running
# command: ["tail", "-f", "/dev/null"]
# uncomment for 'prod' like env locally
# command: ["bin/bundle", "exec", "puma", "-C", "config/puma.rb"]
# pull_policy: build
init: true
depends_on:
- postgres
build:
context: .
# uncomment for 'prod' like env locally
# NODE_ENV: production
# RAILS_ENV: production
ports:
- 3004:3000
volumes:
- ./:/app:cached
- /app/node_modules
environment:
# uncomment for 'prod' like env locally
# NODE_ENV: production
# RAILS_ENV: production
DATABASE_URL: ${DATABASE_URL:-postgresql://tell-us-who-you-employ:password@postgres:5432/tell-us-who-you-employ?}
networks:
- external_network
- internal_network
postgres:
image: postgres:13.7-alpine
environment:
POSTGRES_USER: ${POSTGRES_USER:-tell-us-who-you-employ}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password}
POSTGRES_DB: ${POSTGRES_DB:-tell-us-who-you-employ_development}
ports:
- 5433:5432
volumes:
- postgres-volume:/var/lib/postgresql/data
networks:
- external_network
- internal_network
# Outpost app
outpost:
image: ghcr.io/wearefuturegov/outpost:latest
entrypoint: ["/app/.docker/docker-entrypoint-migrate.sh"]
command: ["web"]
# entrypoint: ["tail", "-f", "/dev/null"]
platform: linux/amd64
environment:
NODE_ENV: production
RAILS_ENV: production
SHOW_ENV_BANNER: ${SHOW_ENV_BANNER:-local tell us outpost (as prod)}
DATABASE_URL: ${DATABASE_URL:-postgresql://outpost:password@outpostdb:5432/outpost?}
ports:
- 3000:3000
networks:
- internal_network
- external_network
# Databases
outpostdb:
image: postgres:13.7-alpine
environment:
POSTGRES_USER: ${POSTGRES_USER:-outpost}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password}
POSTGRES_DB: ${POSTGRES_DB:-outpost_production}
ports:
- 5434:5432
volumes:
- outpostdb-volume:/var/lib/postgresql/data
networks:
- external_network
- internal_network
# https stuff
# uncomment this if you don't want to use ngrok
# dont forget to add 127.0.0.1 outpost to your hosts file
# https-portal:
# image: steveltn/https-portal:1
# ports:
# - "80:80"
# - "443:443"
# environment:
# DOMAINS: "outpost -> http://outpost:3000"
# STAGE: "local" # Don't use production until staging works
# volumes:
# - https-portal-data:/var/lib/https-portal
# networks:
# - external_network
# - internal_network
volumes:
postgres-volume:
outpostdb-volume:
https-portal-data: # Recommended, to avoid re-signing when upgrading HTTPS-PORTAL
networks:
external_network:
internal_network:
internal: true