Last active
January 23, 2024 13:11
-
-
Save saman-taghavi/d6a47f5843f6eade19ad184e9f3e4c5e to your computer and use it in GitHub Desktop.
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
## | |
# docker-compose up [-d] | |
# docker-compose down | |
# docker network create nginx-proxy | |
## | |
version: '3.5' | |
networks: | |
inception-net: | |
nginx-proxy: | |
name: nginx-proxy | |
external: true | |
services: | |
db: | |
image: "mariadb:10.5" | |
environment: | |
- MYSQL_RANDOM_ROOT_PASSWORD=yes | |
- MYSQL_DATABASE=inception | |
- MYSQL_USER=${DBUSER:-inception} | |
- MYSQL_PORT=3306 | |
- MYSQL_PASSWORD=${DBPASSWORD:-inception} | |
volumes: | |
- ${INCEPTION_DB_HOME:-db-data}:/var/lib/mysql | |
command: | |
[ | |
"--character-set-server=utf8mb4", | |
"--collation-server=utf8mb4_bin" | |
] | |
healthcheck: | |
test: | |
[ | |
"CMD", | |
"mysqladmin", | |
"ping", | |
"-h", | |
"localhost", | |
"-p${DBPASSWORD:-inception}", | |
"-u${DBUSER:-inception}" | |
] | |
interval: 20s | |
timeout: 10s | |
retries: 10 | |
networks: | |
inception-net: | |
app: | |
image: "${INCEPTION_IMAGE:-ghcr.io/inception-project/inception}:${INCEPTION_VERSION:-latest}" | |
ports: | |
- "8080:8080" | |
expose: | |
- "8080" | |
environment: | |
- INCEPTION_DB_DIALECT=org.hibernate.dialect.MariaDB103Dialect | |
- INCEPTION_DB_DRIVER=org.mariadb.jdbc.Driver | |
- INCEPTION_DB_URL=jdbc:mariadb://db:3306/inception?useSSL=false&useUnicode=true&characterEncoding=UTF-8 | |
- INCEPTION_DB_USERNAME=${DBUSER:-inception} | |
- INCEPTION_DB_PASSWORD=${DBPASSWORD:-inception} | |
- JAVA_OPTS=-Dspring.jpa.properties.hibernate.dialect.storage_engine=innodb -Xmx10G | |
volumes: | |
- ${INCEPTION_HOME:-app-data}:/export | |
depends_on: | |
db: | |
condition: service_healthy | |
restart: unless-stopped | |
networks: | |
inception-net: | |
nginx-proxy: | |
volumes: | |
app-data: | |
db-data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment