-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
significantly simplify deployment->into 1 compose
- Loading branch information
1 parent
9260609
commit 782cb39
Showing
103 changed files
with
700 additions
and
9,225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
services: | ||
# Service name, container name will be <project name>-<service name>-1 by default | ||
{{ db.service_name }}: | ||
profiles: [ "data", "all" ] | ||
# Docker image that it will set up | ||
image: "${DB_APP_IMAGE}:${DB_VERSION}" | ||
# A volume is basically a file system shared between the host and the container | ||
volumes: | ||
# <volume name in volumes below>:<container destination directory> | ||
# This means the volume will be accessible from the container in the dest. directory in the container | ||
- {{ db.volume_name }}:${DB_RESOURCES_TARGET} | ||
command: -c config_file=${DB_CONF_FILE} | ||
# Some environment variables depend on deployment variables, so we load those in manually | ||
environment: | ||
- PGDATA=${DB_RESOURCES_TARGET} | ||
- POSTGRES_PASSWORD | ||
- POSTGRES_USER | ||
# This maps ports, so the container port will be available at localhost:<HOST_PORT> | ||
ports: | ||
- "${DB_HOST_HOST}:${DB_HOST_PORT}:{{ db.container_port }}" | ||
# Shared memory size, defaults to 64m which can cause problems (apparently) | ||
shm_size: 256m | ||
restart: {{ confspawn_env.restart }} | ||
# healthcheck: | ||
# test: "pg_isready -p {{ db.container_port }}" | ||
# interval: 30s | ||
# retries: 5 | ||
# start_period: 10s | ||
# start_interval: 2s | ||
# timeout: 10s | ||
{{ kv.service_name }}: | ||
profiles: [ "data", "all" ] | ||
image: "${KV_IMAGE}:${KV_VERSION}" | ||
ports: | ||
- "${KV_HOST_HOST}:${KV_HOST_PORT}:{{ kv.container_port }}" | ||
command: /bin/sh -c "redis-server --requirepass ${REDIS_PASSWORD}" | ||
restart: {{ confspawn_env.restart }} | ||
{{ server.service_name }}: | ||
profiles: [ "all" ] | ||
depends_on: | ||
- {{ db.service_name }} | ||
- {{ kv.service_name }} | ||
# Docker image that it will set up | ||
image: "${SERVER_IMAGE}:${SERVER_VERSION}" | ||
# Some environment variables depend on deployment variables, so we load those in manually | ||
environment: | ||
- DB_PASS=${POSTGRES_PASSWORD} | ||
- KV_PASS=${REDIS_PASSWORD} | ||
- MAIL_PASS=${COMCOM_MAIL_PASS} | ||
- KEY_PASS=${KEY_PASSWORD} | ||
- RECREATE=${RECREATE} | ||
# This maps ports, so the container port will be available at localhost:<HOST_PORT> | ||
ports: | ||
- "${SERVER_HOST_HOST}:${SERVER_HOST_PORT}:{{ server.container_port }}" | ||
# Shared memory size, defaults to 64m which can cause problems (apparently) | ||
shm_size: 256m | ||
# This important for being able to send email when email has same ip as host | ||
extra_hosts: | ||
- "host.docker.internal:host-gateway" | ||
restart: {{ confspawn_env.restart }} | ||
# Prevent too large core dumps | ||
ulimits: | ||
core: | ||
soft: 0 | ||
hard: 0 | ||
volumes: | ||
# This name should correspond to the volume mentioned in volumes above | ||
{{ db.volume_name }}: | ||
# A local directory | ||
driver: local | ||
name: {{ db.volume_name }}-{{ confspawn_env.name }} | ||
networks: | ||
# Set up a network so that other containers on this network can access each other | ||
# A different container on this network can access this container by using the container name as the hostname | ||
# So localhost:3000 is exposed to other containers as <container name>:3000 | ||
default: | ||
name: ${NETWORK_NAME} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,37 @@ | ||
POSTGRES_PASSWORD=postpost | ||
REDIS_PASSWORD=redisredis | ||
BARMAN_PASSWORD=barbar | ||
RECREATE=no | ||
DB_VERSION=localdev | ||
KV_VERSION=localdev | ||
SERVER_VERSION={{ confspawn_env.version }} | ||
# The docker compose project name | ||
COMPOSE_PROJECT_NAME={{ main.project }} | ||
NETWORK_NAME={{ main.docker_net_name }} | ||
|
||
# This .env file contains environment variables used during deployment | ||
# The host port will be the port that the host will open, i.e. what nginx will connect to. Hostname defined by HOST_HOST | ||
KV_HOST_HOST=127.0.0.1 | ||
DB_HOST_HOST=127.0.0.1 | ||
SERVER_HOST_HOST=127.0.0.1 | ||
|
||
REDIS_PASSWORD={{ confspawn_env.kv_password }} | ||
# The tag to upload to GHCR to | ||
KV_IMAGE={{ kv.image_name }} | ||
# Docker tag version | ||
KV_VERSION={{ confspawn_env.version }} | ||
# The host port will be the port that the host will open, i.e. what nginx will connect to. Hostname defined by HOST_HOST | ||
KV_HOST_PORT={{ kv.host_port }} | ||
|
||
POSTGRES_PASSWORD={{ confspawn_env.db_password }} | ||
# The tag to upload to GHCR to | ||
DB_APP_IMAGE={{ db.image_name }} | ||
# Docker tag version | ||
DB_VERSION={{ confspawn_env.version }} | ||
DB_HOST_PORT={{ db.host_port }} | ||
# This is the directory that the resources will be loaded into in the container | ||
DB_RESOURCES_TARGET={{ db.resources_target }} | ||
DB_CONF_FILE={{ db.postgres_conf_dir }}/postgresql.conf | ||
POSTGRES_USER={{ db.db_user }} | ||
|
||
SERVER_IMAGE={{ server.image_name }} | ||
SERVER_VERSION={{ confspawn_env.version }} | ||
# The host port will be the port that the host will open, i.e. what nginx will connect to. Hostname defined by HOST_HOST | ||
SERVER_HOST_PORT={{ server.host_port }} | ||
COMCOM_MAIL_PASS="" | ||
KEY_PASSWORD="AT_av0v62Z3hQH50VYwKBks1-VSukK9xDN_Ur34mdZ4" | ||
|
||
RECREATE=no |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,37 @@ | ||
POSTGRES_PASSWORD=postpost | ||
# The docker compose project name | ||
COMPOSE_PROJECT_NAME={{ main.project }} | ||
NETWORK_NAME={{ main.docker_net_name }} | ||
|
||
# This .env file contains environment variables used during deployment | ||
# The host port will be the port that the host will open, i.e. what nginx will connect to. Hostname defined by HOST_HOST | ||
KV_HOST_HOST=0.0.0.0 | ||
DB_HOST_HOST=0.0.0.0 | ||
SERVER_HOST_HOST=0.0.0.0 | ||
|
||
REDIS_PASSWORD=redisredis | ||
BARMAN_PASSWORD=barbar | ||
RECREATE=no | ||
DB_VERSION=localdev | ||
KV_VERSION=localdev | ||
# The tag to upload to GHCR to | ||
KV_IMAGE={{ kv.image_name }} | ||
# Docker tag version | ||
KV_VERSION={{ confspawn_env.version }} | ||
# The host port will be the port that the host will open, i.e. what nginx will connect to. Hostname defined by HOST_HOST | ||
KV_HOST_PORT={{ kv.host_port }} | ||
|
||
POSTGRES_PASSWORD=postpost | ||
# The tag to upload to GHCR to | ||
DB_APP_IMAGE={{ db.image_name }} | ||
# Docker tag version | ||
DB_VERSION={{ confspawn_env.version }} | ||
DB_HOST_PORT={{ db.host_port }} | ||
# This is the directory that the resources will be loaded into in the container | ||
DB_RESOURCES_TARGET={{ db.resources_target }} | ||
DB_CONF_FILE={{ db.postgres_conf_dir }}/postgresql.conf | ||
POSTGRES_USER={{ db.db_user }} | ||
|
||
SERVER_IMAGE={{ server.image_name }} | ||
SERVER_VERSION={{ confspawn_env.version }} | ||
DB_HOST_HOST=0.0.0.0 | ||
KV_HOST_HOST=0.0.0.0 | ||
SERVER_HOST_HOST=0.0.0.0 | ||
# The host port will be the port that the host will open, i.e. what nginx will connect to. Hostname defined by HOST_HOST | ||
SERVER_HOST_PORT={{ server.host_port }} | ||
COMCOM_MAIL_PASS="" | ||
KEY_PASSWORD="AT_av0v62Z3hQH50VYwKBks1-VSukK9xDN_Ur34mdZ4" | ||
|
||
RECREATE=no |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.