Skip to content

Commit 96c0c76

Browse files
committed
local dev conf files added
1 parent a6b1508 commit 96c0c76

File tree

5 files changed

+2257
-16
lines changed

5 files changed

+2257
-16
lines changed

Diff for: docker-compose.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services:
55
db:
66
image: 'postgres:12.2-alpine'
77
hostname: "${POSTGRES_HOSTNAME}"
8-
restart: always
8+
restart: unless-stopped
99
environment:
1010
POSTGRES_USER: "${POSTGRES_USER}"
1111
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
@@ -19,7 +19,7 @@ services:
1919

2020
redis:
2121
image: 'redis:6.0-alpine'
22-
restart: always
22+
restart: unless-stopped
2323
hostname: "${REDIS_HOST}"
2424
environment:
2525
REDIS_HOST: "${REDIS_HOST}"
@@ -37,7 +37,7 @@ services:
3737
build:
3838
context: server
3939
dockerfile: workers/api/Dockerfile
40-
restart: always
40+
restart: unless-stopped
4141
environment:
4242
SERVICE_VERSION: "${SERVICE_VERSION}"
4343
REDIS_HOST: "${REDIS_HOST}"
@@ -63,7 +63,7 @@ services:
6363
build:
6464
context: server
6565
dockerfile: workers/persistence/Dockerfile
66-
restart: always
66+
restart: unless-stopped
6767
environment:
6868
SERVICE_VERSION: "${SERVICE_VERSION}"
6969
POSTGRES_USER: "${POSTGRES_USER}"
@@ -98,7 +98,7 @@ services:
9898
LANG: "en_US.UTF-8"
9999
RENV_PATHS_CACHE: /renv/cache
100100
PYTHONIOENCODING: "utf-8"
101-
restart: always
101+
restart: unless-stopped
102102
volumes:
103103
- /opt/local/renv/cache:/renv/cache
104104
- /var/log/headstart:/var/log/headstart
@@ -127,7 +127,7 @@ services:
127127
RENV_PATHS_CACHE: /renv/cache
128128
PYTHONIOENCODING: "utf-8"
129129
R_BASE_APIKEY: "${R_BASE_APIKEY}"
130-
restart: always
130+
restart: unless-stopped
131131
volumes:
132132
- /opt/local/renv/cache:/renv/cache
133133
- /var/log/headstart:/var/log/headstart
@@ -155,7 +155,7 @@ services:
155155
LANG: "en_US.UTF-8"
156156
RENV_PATHS_CACHE: /renv/cache
157157
PYTHONIOENCODING: "utf-8"
158-
restart: always
158+
restart: unless-stopped
159159
volumes:
160160
- /opt/local/renv/cache:/renv/cache
161161
- /var/log/headstart:/var/log/headstart
@@ -183,7 +183,7 @@ services:
183183
LANG: "en_US.UTF-8"
184184
RENV_PATHS_CACHE: /renv/cache
185185
PYTHONIOENCODING: "utf-8"
186-
restart: always
186+
restart: unless-stopped
187187
volumes:
188188
- /opt/local/renv/cache:/renv/cache
189189
- /var/log/headstart:/var/log/headstart

Diff for: local-hotreload.sh

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
#!/bin/bash
22

3-
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
4-
services=("redis" "db" "api" "persistence" "base" "pubmed" "dataprocessing")
5-
6-
73
docker compose --env-file ./local_dev/flavorconfigs/dev.env stop
8-
for service in ${services[@]}; do
9-
docker compose --env-file ./local_dev/flavorconfigs/dev.env up -d $service
10-
done
11-
cd ./localdev/proxy
4+
docker compose --env-file ./local_dev/flavorconfigs/dev.env up -d
5+
cd ./local_dev/proxy
126
docker compose down
137
docker compose up -d

Diff for: local_dev/pg_hba.conf

+96
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# PostgreSQL Client Authentication Configuration File
2+
# ===================================================
3+
#
4+
# Refer to the "Client Authentication" section in the PostgreSQL
5+
# documentation for a complete description of this file. A short
6+
# synopsis follows.
7+
#
8+
# This file controls: which hosts are allowed to connect, how clients
9+
# are authenticated, which PostgreSQL user names they can use, which
10+
# databases they can access. Records take one of these forms:
11+
#
12+
# local DATABASE USER METHOD [OPTIONS]
13+
# host DATABASE USER ADDRESS METHOD [OPTIONS]
14+
# hostssl DATABASE USER ADDRESS METHOD [OPTIONS]
15+
# hostnossl DATABASE USER ADDRESS METHOD [OPTIONS]
16+
#
17+
# (The uppercase items must be replaced by actual values.)
18+
#
19+
# The first field is the connection type: "local" is a Unix-domain
20+
# socket, "host" is either a plain or SSL-encrypted TCP/IP socket,
21+
# "hostssl" is an SSL-encrypted TCP/IP socket, and "hostnossl" is a
22+
# plain TCP/IP socket.
23+
#
24+
# DATABASE can be "all", "sameuser", "samerole", "replication", a
25+
# database name, or a comma-separated list thereof. The "all"
26+
# keyword does not match "replication". Access to replication
27+
# must be enabled in a separate record (see example below).
28+
#
29+
# USER can be "all", a user name, a group name prefixed with "+", or a
30+
# comma-separated list thereof. In both the DATABASE and USER fields
31+
# you can also write a file name prefixed with "@" to include names
32+
# from a separate file.
33+
#
34+
# ADDRESS specifies the set of hosts the record matches. It can be a
35+
# host name, or it is made up of an IP address and a CIDR mask that is
36+
# an integer (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that
37+
# specifies the number of significant bits in the mask. A host name
38+
# that starts with a dot (.) matches a suffix of the actual host name.
39+
# Alternatively, you can write an IP address and netmask in separate
40+
# columns to specify the set of hosts. Instead of a CIDR-address, you
41+
# can write "samehost" to match any of the server's own IP addresses,
42+
# or "samenet" to match any address in any subnet that the server is
43+
# directly connected to.
44+
#
45+
# METHOD can be "trust", "reject", "md5", "password", "scram-sha-256",
46+
# "gss", "sspi", "ident", "peer", "pam", "ldap", "radius" or "cert".
47+
# Note that "password" sends passwords in clear text; "md5" or
48+
# "scram-sha-256" are preferred since they send encrypted passwords.
49+
#
50+
# OPTIONS are a set of options for the authentication in the format
51+
# NAME=VALUE. The available options depend on the different
52+
# authentication methods -- refer to the "Client Authentication"
53+
# section in the documentation for a list of which options are
54+
# available for which authentication methods.
55+
#
56+
# Database and user names containing spaces, commas, quotes and other
57+
# special characters must be quoted. Quoting one of the keywords
58+
# "all", "sameuser", "samerole" or "replication" makes the name lose
59+
# its special character, and just match a database or username with
60+
# that name.
61+
#
62+
# This file is read on server startup and when the server receives a
63+
# SIGHUP signal. If you edit the file on a running system, you have to
64+
# SIGHUP the server for the changes to take effect, run "pg_ctl reload",
65+
# or execute "SELECT pg_reload_conf()".
66+
#
67+
# Put your actual configuration here
68+
# ----------------------------------
69+
#
70+
# If you want to allow non-local connections, you need to add more
71+
# "host" records. In that case you will also need to make PostgreSQL
72+
# listen on a non-local interface via the listen_addresses
73+
# configuration parameter, or via the -i or -h command line switches.
74+
75+
# CAUTION: Configuring the system for local "trust" authentication
76+
# allows any local user to connect as any PostgreSQL user, including
77+
# the database superuser. If you do not trust all your local users,
78+
# use another authentication method.
79+
80+
81+
# TYPE DATABASE USER ADDRESS METHOD
82+
83+
# "local" is for Unix domain socket connections only
84+
local all all trust
85+
# IPv4 local connections:
86+
# host all all 127.0.0.1/32 trust
87+
# IPv6 local connections:
88+
host all all ::1/128 trust
89+
# Allow replication connections from localhost, by a user with the
90+
# replication privilege.
91+
local replication all trust
92+
host replication all 127.0.0.1/32 trust
93+
host replication all ::1/128 trust
94+
95+
host all headstart 172.0.0.1/8 md5
96+
host all headstart 127.0.0.1/32 md5

0 commit comments

Comments
 (0)