-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
553d2c3
commit 6205d51
Showing
5 changed files
with
152 additions
and
6 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,38 @@ | ||
############ | ||
# Database | ||
############ | ||
|
||
POSTGRES_HOST=localhost | ||
POSTGRES_USER=postgres | ||
POSTGRES_PASSWORD="" | ||
POSTGRES_PORT=5432 | ||
|
||
############ | ||
# Dev Container Environement Variables | ||
############ | ||
DEV_SERVER_IP=127.0.0.1 | ||
DEV_SECRET_KEY_BASE=k/B2/h3nrn+XIwYaLZcc7cIAKfUihj9gLwm/IrtzNhx6daOLRax2xAzDCRoiHCNuH1iPOlMhp9aD91HJ | ||
DEV_DATABASE_URL=ecto://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST:$POSTGRES_PORT/animina_dev | ||
DEV_PHX_HOST=dev.animina.de | ||
DEV_PORT=4300 | ||
DEV_FILE_VOLUME_PATH=/etc/animina/dev/ | ||
DEV_CONTAINER_IMAGE="animina/animina-dev" | ||
|
||
############ | ||
# Prod Container Environement Variables | ||
############ | ||
PROD_SERVER_IP=127.0.0.1 | ||
PROD_SECRET_KEY_BASE=l8m2Yg9DmUzyC/onSZuzd2yR0UZbPTw3a8fRwMLDZqyhF1TuPdPys5pv/7rAo8xN12ZtuOW46kVEWBpy | ||
PROD_DATABASE_URL=ecto://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST:$POSTGRES_PORT/animina | ||
PROD_PHX_HOST=animina.de | ||
PROD_PORT=4310 | ||
PROD_FILE_VOLUME_PATH=/etc/animina/prod/ | ||
PROD_CONTAINER_IMAGE="animina/animina-prod" | ||
|
||
############ | ||
# Shared Environement Variables | ||
############ | ||
DISABLE_ML_FEATURES="true" | ||
KAMAL_REGISTRY_USERNAME="animina" | ||
KAMAL_REGISTRY_PASSWORD="" | ||
REMOTE_BUILDER_SSH_URL="ssh://root@$DEV_SERVER_IP" |
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 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 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,48 @@ | ||
# Name of your application. Used to uniquely configure containers. | ||
service: animina | ||
|
||
<% require "dotenv"; Dotenv.load(".env") %> | ||
|
||
# Name of the container image. | ||
image: animina/animina | ||
|
||
# Deploy to these servers. | ||
servers: | ||
web: | ||
hosts: | ||
- <%= ENV["PROD_SERVER_IP"] %> | ||
options: | ||
publish: <%= ENV["PROD_PORT"] %>:4000 | ||
proxy: false | ||
|
||
# Credentials for your image host. | ||
registry: | ||
server: ghcr.io | ||
username: | ||
- KAMAL_REGISTRY_USERNAME | ||
# Always use an access token rather than real password (pulled from .kamal/secrets). | ||
password: | ||
- KAMAL_REGISTRY_PASSWORD | ||
|
||
|
||
builder: | ||
arch: amd64 | ||
|
||
# Inject ENV variables into containers (secrets come from .kamal/secrets). | ||
env: | ||
clear: | ||
PORT: 4000 | ||
MIX_ENV: prod | ||
secret: | ||
- DATABASE_URL | ||
- SECRET_KEY_BASE | ||
- PHX_HOST | ||
- DISABLE_ML_FEATURES | ||
|
||
ssh: | ||
user: root | ||
|
||
# Use a persistent storage volume. | ||
# | ||
volumes: | ||
- "<%= ENV["PROD_FILE_VOLUME_PATH"] %>:/uploads" |
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