This repository was archived by the owner on Jun 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
65 lines (57 loc) · 1.65 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
version: '3.8'
services:
web:
restart: unless-stopped
container_name: simaen-web
hostname: server-host-name #server host name
build:
context: ./simaen-web/
#target: dev
target: prod
ports:
# dev target
#- "8080:8080"
# prod target
- "80:8080"
- "443:8443"
volumes:
# - "/sec/cert/:/etc/httpd/tls"
- "/sec/certs/simaen_2021.pem:/httpd-ssl/certs/simaen_2021.pem"
- "/sec/certs/simaen_2021.key:/httpd-ssl/private/simaen_2021.key"
# - "./simaen-web/ssl.conf:/etc/httpd/conf.d/ssl.conf"
environment:
PORT: 8080 # used only for dev target
REACT_APP_API_URL: https://simaen.philab.cdc.gov/api # must be fqdn of website to api
depends_on:
- api
db:
restart: unless-stopped
container_name: simaen-db
hostname: simaen-db
image: postgres:13-buster
ports:
# not required for prod or dev, only required to connect from host/other
- "5432:5432"
volumes:
- "simaen-db-pgdata:/var/lib/postgresql/data"
- "./simaen-api/schema.sql:/docker-entrypoint-initdb.d/1-simaen-db-schema.sql:ro"
- "./simaen-db/simaen-db-data.sql.gz:/docker-entrypoint-initdb.d/2-simaen-db-data.sql.gz:ro"
environment:
POSTGRES_DB: simaen
POSTGRES_PASSWORD: password
POSTGRES_USER: simaen
api:
restart: unless-stopped
container_name: simaen-api
hostname: simaen-api
build: ./simaen-api/
ports:
- "5000:5000"
environment:
PORT: 5000
volumes:
- "./simaen-db/postgres.json:/opt/simaen-api/simaen_api/postgres.json:ro"
depends_on:
- db
volumes:
simaen-db-pgdata: