@@ -3,47 +3,28 @@ version: "3.8"
33services :
44 nixopus-api :
55 image : ghcr.io/${GITHUB_REPOSITORY:-raghavyuva/nixopus}-api:latest
6- container_name : nixopus-api-container
6+ container_name : nixopus-api
77 ports :
88 - " ${API_PORT:-8443}:${API_PORT:-8443}"
99 restart : unless-stopped
1010 env_file :
11- - /etc/nixopus/source/api/.env
11+ - ${NIXOPUS_HOME:- /etc/nixopus} /source/api/.env
1212 environment :
1313 - HOST_NAME=nixopus-db
1414 volumes :
1515 - ./logs:/app/logs
16- - ${DOCKER_CERT_PATH:-/etc/nixopus/docker-certs}:/etc/nixopus/docker-certs
17- - ${SSH_PRIVATE_KEY:-/etc/nixopus/ssh/id_rsa}:/etc/nixopus/ssh/id_rsa
18- - ${MOUNT_PATH:-/etc/nixopus/configs}:/etc/nixopus/configs
16+ - ${NIXOPUS_HOME:-/etc/nixopus}:/etc/nixopus
1917 - /var/run/docker.sock:/var/run/docker.sock
20- - /etc/nixopus/source/api/.env:/app/.env
18+ - ${NIXOPUS_HOME:- /etc/nixopus} /source/api/.env:/app/.env
2119 networks :
2220 - nixopus-network
2321 depends_on :
2422 nixopus-db :
2523 condition : service_healthy
2624
27- nixopus-redis :
28- image : redis:7-alpine
29- container_name : nixopus-redis-container
30- restart : unless-stopped
31- ports :
32- - " ${REDIS_PORT:-6379}:6379"
33- volumes :
34- - ${REDIS_VOLUME:-/etc/nixopus/redis}:/data
35- command : redis-server --appendonly yes
36- networks :
37- - nixopus-network
38- healthcheck :
39- test : ["CMD", "redis-cli", "ping"]
40- interval : 5s
41- timeout : 5s
42- retries : 5
43-
4425 nixopus-db :
4526 image : postgres:14-alpine
46- container_name : nixopus-db-container
27+ container_name : nixopus-db
4728 restart : unless-stopped
4829 environment :
4930 - POSTGRES_USER=${USERNAME}
@@ -53,7 +34,7 @@ services:
5334 ports :
5435 - " ${DB_PORT:-5432}:5432"
5536 volumes :
56- - ${DB_VOLUME :-/etc/nixopus/db} :/var/lib/postgresql/data
37+ - ${NIXOPUS_HOME :-/etc/nixopus} /db:/var/lib/postgresql/data
5738 networks :
5839 - nixopus-network
5940 healthcheck :
@@ -62,47 +43,34 @@ services:
6243 timeout : 5s
6344 retries : 5
6445
65- # nixopus-test-db:
66- # image: postgres:14-alpine
67- # container_name: nixopus-test-db-container
68- # ports:
69- # - "${TEST_DB_PORT:-5433}:5432"
70- # restart: unless-stopped
71- # environment:
72- # - POSTGRES_USER=${TEST_DB_USERNAME:-nixopus}
73- # - POSTGRES_PASSWORD=${TEST_DB_PASSWORD:-nixopus}
74- # - POSTGRES_DB=${TEST_DB_NAME:-nixopus_test}
75- # networks:
76- # - nixopus-network
77-
7846 nixopus-view :
7947 image : ghcr.io/${GITHUB_REPOSITORY:-raghavyuva/nixopus}-view:latest
80- container_name : nixopus-view-container
48+ container_name : nixopus-view
8149 build :
8250 args :
8351 - NEXT_PUBLIC_PORT=${NEXT_PUBLIC_PORT}
8452 ports :
8553 - " ${NEXT_PUBLIC_PORT:-7443}:${NEXT_PUBLIC_PORT:-7443}"
8654 restart : unless-stopped
8755 env_file :
88- - /etc/nixopus/source/view/.env
56+ - ${NIXOPUS_HOME:- /etc/nixopus} /source/view/.env
8957 volumes :
9058 - ./logs:/app/logs
91- - /etc/nixopus/source/view/.env:/app/.env
59+ - ${NIXOPUS_HOME:- /etc/nixopus} /source/view/.env:/app/.env
9260 networks :
9361 - nixopus-network
9462
9563 nixopus-caddy :
9664 image : caddy:latest
97- container_name : nixopus-caddy-container
65+ container_name : nixopus-caddy
9866 ports :
9967 - " 2019:2019"
10068 - " 80:80"
10169 - " 443:443"
10270 volumes :
103- - /etc/nixopus/source/helpers/Caddyfile:/etc/caddy/Caddyfile
104- - ${CADDY_DATA_VOLUME :-/etc/nixopus/caddy} :/data
105- - ${CADDY_CONFIG_VOLUME :-/etc/nixopus/caddy} :/config
71+ - ${NIXOPUS_HOME:- /etc/nixopus} /source/helpers/Caddyfile:/etc/caddy/Caddyfile
72+ - ${NIXOPUS_HOME :-/etc/nixopus} /caddy:/data
73+ - ${NIXOPUS_HOME :-/etc/nixopus} /caddy:/config
10674 command :
10775 [
10876 " caddy" ,
0 commit comments