Shift a bunch of root-directory files into a new less-cluttered bootstrap directory.
This commit is contained in:
parent
9da3451ed9
commit
0af172d173
12 changed files with 14 additions and 1425 deletions
|
@ -24,7 +24,7 @@ ENV FLASK_APP=files/cli:app
|
||||||
# Release container
|
# Release container
|
||||||
FROM base AS release
|
FROM base AS release
|
||||||
|
|
||||||
COPY supervisord.conf.release /etc/supervisord.conf
|
COPY bootstrap/supervisord.conf.release /etc/supervisord.conf
|
||||||
CMD [ "/usr/bin/supervisord", "-c", "/etc/supervisord.conf" ]
|
CMD [ "/usr/bin/supervisord", "-c", "/etc/supervisord.conf" ]
|
||||||
|
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ FROM release AS dev
|
||||||
COPY thirdparty/sqlalchemy-easy-profile sqlalchemy-easy-profile
|
COPY thirdparty/sqlalchemy-easy-profile sqlalchemy-easy-profile
|
||||||
RUN cd sqlalchemy-easy-profile && python3 setup.py install
|
RUN cd sqlalchemy-easy-profile && python3 setup.py install
|
||||||
|
|
||||||
COPY supervisord.conf.dev /etc/supervisord.conf
|
COPY bootstrap/supervisord.conf.dev /etc/supervisord.conf
|
||||||
CMD [ "/usr/bin/supervisord", "-c", "/etc/supervisord.conf" ]
|
CMD [ "/usr/bin/supervisord", "-c", "/etc/supervisord.conf" ]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
version: '2.3'
|
version: '2.3'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
files:
|
site:
|
||||||
build:
|
build:
|
||||||
target: operation
|
target: operation
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
version: '2.3'
|
version: '2.3'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
files:
|
site:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
target: dev
|
target: dev
|
||||||
volumes:
|
volumes:
|
||||||
- "./:/service"
|
- "./:/service"
|
||||||
env_file: env
|
env_file: bootstrap/site_env
|
||||||
environment:
|
environment:
|
||||||
- DATABASE_URL=postgresql://postgres@postgres:5432
|
- DATABASE_URL=postgresql://postgres@postgres:5432
|
||||||
- REDIS_URL=redis://redis
|
- REDIS_URL=redis://redis
|
||||||
|
@ -31,8 +31,8 @@ services:
|
||||||
# command: ["postgres", "-c", "log_statement=all"]
|
# command: ["postgres", "-c", "log_statement=all"]
|
||||||
# uncomment this if u wanna output all SQL queries to the console
|
# uncomment this if u wanna output all SQL queries to the console
|
||||||
volumes:
|
volumes:
|
||||||
- "./schema.sql:/docker-entrypoint-initdb.d/00-schema.sql"
|
- "./bootstrap/original-schema.sql:/docker-entrypoint-initdb.d/00-schema.sql"
|
||||||
- "./seed-db.sql:/docker-entrypoint-initdb.d/10-seed-db.sql"
|
- "./bootstrap/original-seed-db.sql:/docker-entrypoint-initdb.d/10-seed-db.sql"
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_HOST_AUTH_METHOD=trust
|
- POSTGRES_HOST_AUTH_METHOD=trust
|
||||||
ports:
|
ports:
|
||||||
|
|
44
pg_hba.conf
44
pg_hba.conf
|
@ -1,44 +0,0 @@
|
||||||
# Database and user names containing spaces, commas, quotes and other
|
|
||||||
# special characters must be quoted. Quoting one of the keywords
|
|
||||||
# "all", "sameuser", "samerole" or "replication" makes the name lose
|
|
||||||
# its special character, and just match a database or username with
|
|
||||||
# that name.
|
|
||||||
#
|
|
||||||
# This file is read on server startup and when the server receives a
|
|
||||||
# SIGHUP signal. If you edit the file on a running system, you have to
|
|
||||||
# SIGHUP the server for the changes to take effect, run "pg_ctl reload",
|
|
||||||
# or execute "SELECT pg_reload_conf()".
|
|
||||||
#
|
|
||||||
# Put your actual configuration here
|
|
||||||
# ----------------------------------
|
|
||||||
#
|
|
||||||
# If you want to allow non-local connections, you need to add more
|
|
||||||
# "host" records. In that case you will also need to make PostgreSQL
|
|
||||||
# listen on a non-local interface via the listen_addresses
|
|
||||||
# configuration parameter, or via the -i or -h command line switches.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# DO NOT DISABLE!
|
|
||||||
# If you change this first entry you will need to make sure that the
|
|
||||||
# database superuser can access the database using some other method.
|
|
||||||
# Noninteractive access to all databases is required during automatic
|
|
||||||
# maintenance (custom daily cronjobs, replication, and similar tasks).
|
|
||||||
#
|
|
||||||
# Database administrative login by Unix domain socket
|
|
||||||
local all postgres trust
|
|
||||||
|
|
||||||
# TYPE DATABASE USER ADDRESS METHOD
|
|
||||||
|
|
||||||
# "local" is for Unix domain socket connections only
|
|
||||||
local all all trust
|
|
||||||
# IPv4 local connections:
|
|
||||||
host all all 127.0.0.1/32 trust
|
|
||||||
# IPv6 local connections:
|
|
||||||
host all all ::1/128 trust
|
|
||||||
# Allow replication connections from localhost, by a user with the
|
|
||||||
# replication privilege.
|
|
||||||
local replication all trust
|
|
||||||
host replication all 127.0.0.1/32 trust
|
|
||||||
host replication all ::1/128 trust
|
|
|
@ -94,6 +94,6 @@ def downgrade():
|
||||||
docker-compose up --build
|
docker-compose up --build
|
||||||
```
|
```
|
||||||
|
|
||||||
## So what's up with schema.sql, can I just change that?
|
## So what's up with original-schema.sql, can I just change that?
|
||||||
|
|
||||||
No, please do not do that. Instead, please make a migration as described above.
|
No, please do not do that. Instead, please make a migration as described above.
|
||||||
|
|
1372
redis.conf
1372
redis.conf
File diff suppressed because it is too large
Load diff
|
@ -36,6 +36,11 @@ def _execute(command,**kwargs):
|
||||||
|
|
||||||
proc.wait()
|
proc.wait()
|
||||||
if check and proc.returncode != 0:
|
if check and proc.returncode != 0:
|
||||||
|
print("STDOUT:")
|
||||||
|
print(stdout)
|
||||||
|
print("STDERR (not interlaced properly, sorry):")
|
||||||
|
print(stderr)
|
||||||
|
|
||||||
raise subprocess.CalledProcessError(
|
raise subprocess.CalledProcessError(
|
||||||
command,
|
command,
|
||||||
proc.returncode,
|
proc.returncode,
|
||||||
|
@ -54,7 +59,7 @@ def _docker(command, **kwargs):
|
||||||
return _execute([
|
return _execute([
|
||||||
"docker-compose",
|
"docker-compose",
|
||||||
"exec", '-T',
|
"exec", '-T',
|
||||||
"files",
|
"site",
|
||||||
] + command,
|
] + command,
|
||||||
**kwargs)
|
**kwargs)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue