Skip to content

Commit

Permalink
[simple]add a test environment.
Browse files Browse the repository at this point in the history
  • Loading branch information
vistart committed Aug 15, 2024
1 parent 9dd5107 commit 47d4c82
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
40 changes: 40 additions & 0 deletions tests/environments/go1.23_redis7_mysql8/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
version: "3.8"
services:
redis:
image: redis:7
deploy:
resources:
limits:
memory: 1G
reservations:
memory: 256M
ports:
- "6379:6379"
networks:
- dev
volumes:
- redis_data:/data
mysql:
image: mysql:8
environment:
MYSQL_ROOT_PASSWORD: 12345678
MYSQL_USER: user
MYSQL_PASSWORD: 12345678
MYSQL_DATABASE: go-dag
deploy:
resources:
limits:
memory: 1G
reservations:
memory: 256M
ports:
- "3306:3306"
networks:
- dev
volumes:
- mysql_data:/var/lib/mysql
networks:
dev:
volumes:
redis_data:
mysql_data:
16 changes: 16 additions & 0 deletions tests/environments/go1.23_redis7_mysql8/golang_alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM golang:alpine

ENV GO111MODULE=on \
CGO_ENABLED=0 \
GOOS=linux

RUN apk add --no-cache git

WORKDIR /opt/project

COPY go.mod go.sum ./

RUN go mod tidy
RUN go build

CMD ["./go-dag"]

0 comments on commit 47d4c82

Please sign in to comment.