Skip to content

Instantly share code, notes, and snippets.

@ptflp
Created February 8, 2023 06:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ptflp/3c15fc8b4f41a4bb06fd5314c73f593a to your computer and use it in GitHub Desktop.
Save ptflp/3c15fc8b4f41a4bb06fd5314c73f593a to your computer and use it in GitHub Desktop.
test
version: '3.3'
services:
api:
container_name: ${APP_NAME}api
image: ${IMAGE}
env_file: .env
command: bash -c "cd ${REPOSITORY} && go mod tidy -compat=1.17 && go run ./cmd/api"
restart: always
volumes:
- ./:/go/src/${REPOSITORY}
environment:
- VIRTUAL_HOST=${ENDPOINT}
- LETSENCRYPT_HOST=${ENDPOINT}
- VIRTUAL_PORT=${SERVER_PORT}
- REPOSITORY=${REPOSITORY}
ports:
- ${HOST}:${SERVER_PORT}:${SERVER_PORT}
networks:
- skynet
logging:
options:
max-size: "10m"
max-file: "3"
cache:
container_name: ${APP_NAME}cache
image: redis:7.0.2-alpine
command: /bin/sh -c 'redis-server --appendonly yes --requirepass ${CACHE_PASSWORD}'
restart: always
volumes:
- ../${APP_NAME}cache:/data
environment:
- CACHE_PASSWORD=${CACHE_PASSWORD}
ports:
- ${HOST}:6379:6379
networks:
- skynet
logging:
options:
max-size: "10m"
max-file: "3"
db:
container_name: ${APP_NAME}db
image: postgres:14.4-alpine
restart: always
volumes:
- ../db${APP_NAME}:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_USER=${DB_USER}
ports:
- ${HOST}:${DB_PORT}:${DB_PORT}
networks:
- skynet
logging:
options:
max-size: "10m"
max-file: "3"
selenium:
container_name: ${APP_NAME}selenium
image: selenium/standalone-chrome
restart: always
ports:
- ${HOST}:${SELENIUM_PORT}:${SELENIUM_PORT}
volumes:
- /dev/shm:/dev/shm
networks:
- skynet
environment:
- VIRTUAL_HOST=${SELENIUM_ENDPOINT}
- LETSENCRYPT_HOST=${SELENIUM_ENDPOINT}
- VIRTUAL_PORT=${SELENIUM_PORT}
- SE_NODE_MAX_SESSIONS=3
- SE_NODE_OVERRIDE_MAX_SESSIONS=true
- SE_VNC_NO_PASSWORD=1
logging:
options:
max-size: "10m"
max-file: "3"
networks:
skynet:
external:
name: skynet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment